-
-
Save milin/1150422 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if form.is_valid(): | |
form.save() | |
response = JsonResponse(template.loader.render_to_string('email_results.html', context)) | |
print response.content | |
response.content = "<html><body><textarea>%s</textarea></body></html>" % response.content | |
response['Content-Type'] = 'text/html' | |
return response | |
else: | |
response = JsonResponse(error=iriencode(context['form'].as_p())) | |
response.content = "<html><body><textarea>%s</textarea></body></html>" % response.content | |
response['Content-Type'] = 'text/html' # Dojo needs this | |
return response |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment