equal
deleted
inserted
replaced
20 __authors__ = [ |
20 __authors__ = [ |
21 '"Pawel Solyga" <pawel.solyga@gmail.com>', |
21 '"Pawel Solyga" <pawel.solyga@gmail.com>', |
22 ] |
22 ] |
23 |
23 |
24 |
24 |
25 from soc.logic import models |
|
26 from soc.views import helper |
25 from soc.views import helper |
|
26 from soc.logic.models import sponsor |
27 from soc.views.helper import access |
27 from soc.views.helper import access |
28 from soc.views.helper import decorators |
28 from soc.views.helper import decorators |
29 |
29 |
30 import soc.logic |
30 import soc.logic |
31 import soc.models.sponsor as sponsor_model |
31 import soc.models.sponsor as sponsor_model |
62 |
62 |
63 offset, limit = helper.lists.cleanListParameters( |
63 offset, limit = helper.lists.cleanListParameters( |
64 offset=request.GET.get('offset'), limit=request.GET.get('limit')) |
64 offset=request.GET.get('offset'), limit=request.GET.get('limit')) |
65 |
65 |
66 # Fetch one more to see if there should be a 'next' link |
66 # Fetch one more to see if there should be a 'next' link |
67 sponsors = models.sponsor.logic.getForLimitAndOffset(limit=limit + 1, |
67 sponsors = sponsor.logic.getForLimitAndOffset(limit=limit + 1, |
68 offset=offset) |
68 offset=offset) |
69 |
69 |
70 context['pagination_form'] = helper.lists.makePaginationForm(request, limit) |
70 context['pagination_form'] = helper.lists.makePaginationForm(request, limit) |
71 |
71 |
72 list_templates = {'list_main': 'soc/list/list_main.html', |
72 list_templates = {'list_main': 'soc/list/list_main.html', |