equal
deleted
inserted
replaced
35 |
35 |
36 |
36 |
37 DEF_SITE_SPONSOR_LIST_ALL_TMPL = 'soc/models/list.html' |
37 DEF_SITE_SPONSOR_LIST_ALL_TMPL = 'soc/models/list.html' |
38 |
38 |
39 @decorators.view |
39 @decorators.view |
40 def all(request, page=None, template=DEF_SITE_SPONSOR_LIST_ALL_TMPL): |
40 def all(request, page_name=None, template=DEF_SITE_SPONSOR_LIST_ALL_TMPL): |
41 """Show a list of all Sponsors (limit rows per page). |
41 """Show a list of all Sponsors (limit rows per page). |
42 |
42 |
43 Args: |
43 Args: |
44 request: the standard Django HTTP request object |
44 request: the standard Django HTTP request object |
45 page: a soc.logic.site.page.Page object which is abstraction that combines |
45 page: a soc.logic.site.page.Page object which is abstraction that combines |
57 except soc.views.out_of_band.AccessViolationResponse, alt_response: |
57 except soc.views.out_of_band.AccessViolationResponse, alt_response: |
58 return alt_response.response() |
58 return alt_response.response() |
59 |
59 |
60 # create default template context for use with any templates |
60 # create default template context for use with any templates |
61 context = helper.responses.getUniversalContext(request) |
61 context = helper.responses.getUniversalContext(request) |
62 context['page'] = page |
62 context['page_name'] = page_name |
63 |
63 |
64 offset, limit = helper.lists.cleanListParameters( |
64 offset, limit = helper.lists.cleanListParameters( |
65 offset=request.GET.get('offset'), limit=request.GET.get('limit')) |
65 offset=request.GET.get('offset'), limit=request.GET.get('limit')) |
66 |
66 |
67 # Fetch one more to see if there should be a 'next' link |
67 # Fetch one more to see if there should be a 'next' link |