equal
deleted
inserted
replaced
28 |
28 |
29 from soc.logic import document |
29 from soc.logic import document |
30 from soc.logic import out_of_band |
30 from soc.logic import out_of_band |
31 from soc.views import simple |
31 from soc.views import simple |
32 from soc.views import helper |
32 from soc.views import helper |
|
33 import soc.views.helper.responses |
33 import soc.views.helper.templates |
34 import soc.views.helper.templates |
34 from soc.views.helpers import response_helpers |
|
35 |
35 |
36 |
36 |
37 DEF_DOCS_PUBLIC_TMPL = 'soc/docs/public.html' |
37 DEF_DOCS_PUBLIC_TMPL = 'soc/docs/public.html' |
38 |
38 |
39 def public(request, partial_path=None, linkname=None, |
39 def public(request, partial_path=None, linkname=None, |
52 Returns: |
52 Returns: |
53 A subclass of django.http.HttpResponse which either contains the form to |
53 A subclass of django.http.HttpResponse which either contains the form to |
54 be filled out, or a redirect to the correct view in the interface. |
54 be filled out, or a redirect to the correct view in the interface. |
55 """ |
55 """ |
56 # create default template context for use with any templates |
56 # create default template context for use with any templates |
57 context = response_helpers.getUniversalContext(request) |
57 context = helper.responses.getUniversalContext(request) |
58 |
58 |
59 # TODO: there eventually needs to be a call to some controller logic that |
59 # TODO: there eventually needs to be a call to some controller logic that |
60 # implements some sort of access controls, based on the currently |
60 # implements some sort of access controls, based on the currently |
61 # logged-in User's Roles, etc. |
61 # logged-in User's Roles, etc. |
62 |
62 |
71 return simple.errorResponse(request, error, template, context) |
71 return simple.errorResponse(request, error, template, context) |
72 |
72 |
73 doc.content = helper.templates.unescape(doc.content) |
73 doc.content = helper.templates.unescape(doc.content) |
74 context['document'] = doc |
74 context['document'] = doc |
75 |
75 |
76 return response_helpers.respond(request, template, context) |
76 return helper.responses.respond(request, template, context) |