equal
deleted
inserted
replaced
24 |
24 |
25 from soc.logic import works |
25 from soc.logic import works |
26 from soc.views import simple |
26 from soc.views import simple |
27 from soc.views import helper |
27 from soc.views import helper |
28 import soc.views.helper.lists |
28 import soc.views.helper.lists |
29 from soc.views.helpers import response_helpers |
29 import soc.views.helper.responses |
30 |
30 |
31 import soc.models.document |
31 import soc.models.document |
32 |
32 |
33 |
33 |
34 DEF_SITE_DOCS_LIST_ALL_TMPL = 'soc/site/docs/list/all.html' |
34 DEF_SITE_DOCS_LIST_ALL_TMPL = 'soc/site/docs/list/all.html' |
44 Returns: |
44 Returns: |
45 A subclass of django.http.HttpResponse which either contains the form to |
45 A subclass of django.http.HttpResponse which either contains the form to |
46 be filled out, or a redirect to the correct view in the interface. |
46 be filled out, or a redirect to the correct view in the interface. |
47 """ |
47 """ |
48 # create default template context for use with any templates |
48 # create default template context for use with any templates |
49 context = response_helpers.getUniversalContext(request) |
49 context = helper.responses.getUniversalContext(request) |
50 |
50 |
51 alt_response = simple.getAltResponseIfNotDeveloper(request, |
51 alt_response = simple.getAltResponseIfNotDeveloper(request, |
52 context=context) |
52 context=context) |
53 if alt_response: |
53 if alt_response: |
54 return alt_response |
54 return alt_response |
69 |
69 |
70 context = helper.lists.setList( |
70 context = helper.lists.setList( |
71 request, context, docs, |
71 request, context, docs, |
72 offset=offset, limit=limit, list_templates=list_templates) |
72 offset=offset, limit=limit, list_templates=list_templates) |
73 |
73 |
74 return response_helpers.respond(request, template, context) |
74 return helper.responses.respond(request, template, context) |