Luke Plant committed 0d798d5

Fixed crashing bug introduced by overzealous removal of RequestContext

Comments (0)

Files changed (1)


 from django.core.validators import email_re
 from django.http import Http404, HttpResponseRedirect, HttpResponse
 from django.shortcuts import render, get_object_or_404
+from django.template import RequestContext
 from django.template.loader import render_to_string
 from django.template.defaultfilters import wordwrap
 from django.views.decorators.cache import never_cache
                   ("noapplicationform", "cciw/officers/officer_list_noapplicationform.html")]
         retval = {}
         for section, tname in tnames:
-            retval[section] = render_to_string(tname, context_instance=c)
+            retval[section] = render_to_string(tname, context_instance=RequestContext(request, c))
         return HttpResponse(python_to_json(retval),
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.