I'm starting to work on my first Django app, and I'm experiencing some
weird behaviour with render_to_response.
I have a base template (base.html), that uses LANGUAGE_CODE in the
<html> attributes.
I currently only have one view:
def upload_file(request):
manipulator = VsslUpload.AddManipulator()
if request.POST:
return HttpResponseRedirect("firmware/success/")
else:
form = forms.FormWrapper(manipulator, {}, {})
return render_to_response('firmware/upload.html',
{'form':form})
firmware/success uses django.views.generic.simple.direct_to_template
for
its view, and this 'upload_file' view is for the URL firmware/
The templates for each of the URLs both inherit from base.html. So the
only place in my app where I explicitly use LANGUAGE_CODE is in
base.html
When I load firmware/ in the browser and look at the source, the
LANGUAGE_CODE didn't get populated, it was just replaced with empty
strings. However, it works fine for firmware/success
Is there something about render_to_response that makes it that
LANGUAGE_CODE doesn't get properly populated?
Thanks in advance,
Jay P.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---