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.helper import access |
|
26 from soc.views import simple |
25 from soc.views import simple |
27 from soc.views import helper |
26 from soc.views import helper |
|
27 from soc.views.helper import access |
28 import soc.views.helper.lists |
28 import soc.views.helper.lists |
29 import soc.views.helper.responses |
29 import soc.views.helper.responses |
|
30 import soc.views.out_of_band |
30 |
31 |
31 |
32 |
32 DEF_SITE_SPONSOR_LIST_ALL_TMPL = 'soc/group/list/all.html' |
33 DEF_SITE_SPONSOR_LIST_ALL_TMPL = 'soc/group/list/all.html' |
33 |
34 |
34 def all(request, template=DEF_SITE_SPONSOR_LIST_ALL_TMPL): |
35 def all(request, template=DEF_SITE_SPONSOR_LIST_ALL_TMPL): |
35 """Show a list of all Sponsors (limit rows per page). |
36 """Show a list of all Sponsors (limit rows per page). |
36 """ |
37 """ |
37 |
38 |
38 try: |
39 try: |
39 access.checkIsDeveloper(request) |
40 access.checkIsDeveloper(request) |
40 except soc.logic.out_of_band.AccessViolationResponse, alt_response: |
41 except soc.views.out_of_band.AccessViolationResponse, alt_response: |
41 return alt_response.response() |
42 return alt_response.response() |
42 |
43 |
43 # create default template context for use with any templates |
44 # create default template context for use with any templates |
44 context = helper.responses.getUniversalContext(request) |
45 context = helper.responses.getUniversalContext(request) |
45 |
46 |