equal
deleted
inserted
replaced
20 __authors__ = [ |
20 __authors__ = [ |
21 '"Todd Larsen" <tlarsen@google.com>', |
21 '"Todd Larsen" <tlarsen@google.com>', |
22 ] |
22 ] |
23 |
23 |
24 |
24 |
25 from soc.logic import works |
25 import soc.logic |
26 from soc.logic.helper import access |
26 from soc.logic.helper import access |
27 from soc.views import simple |
27 from soc.views import simple |
28 from soc.views import helper |
28 from soc.views import helper |
29 import soc.views.helper.lists |
29 import soc.views.helper.lists |
30 import soc.views.helper.responses |
30 import soc.views.helper.responses |
57 |
57 |
58 offset, limit = helper.lists.cleanListParameters( |
58 offset, limit = helper.lists.cleanListParameters( |
59 offset=request.GET.get('offset'), limit=request.GET.get('limit')) |
59 offset=request.GET.get('offset'), limit=request.GET.get('limit')) |
60 |
60 |
61 # Fetch one more to see if there should be a 'next' link |
61 # Fetch one more to see if there should be a 'next' link |
62 docs = works.getWorksForLimitAndOffset( |
62 docs = soc.logic.work_logic.getForLimitAndOffset(limit + 1, offset=offset) |
63 limit + 1, offset=offset, cls=soc.models.document.Document) |
|
64 |
63 |
65 context['pagination_form'] = helper.lists.makePaginationForm(request, limit) |
64 context['pagination_form'] = helper.lists.makePaginationForm(request, limit) |
66 |
65 |
67 list_templates = {'list_main': 'soc/list/list_main.html', |
66 list_templates = {'list_main': 'soc/list/list_main.html', |
68 'list_pagination': 'soc/list/list_pagination.html', |
67 'list_pagination': 'soc/list/list_pagination.html', |