app/soc/views/helper/responses.py
changeset 1812 a0ab93cc3cd5
parent 1797 f0c83ca3bb08
child 2077 fd2e83a297c7
--- a/app/soc/views/helper/responses.py	Thu Mar 12 21:37:38 2009 +0000
+++ b/app/soc/views/helper/responses.py	Thu Mar 12 21:38:07 2009 +0000
@@ -74,8 +74,10 @@
   if response_args is None:
     response_args = {}
 
-  response_args['content'] = response_args.get(
-      'content', loader.render_to_string(template, dictionary=context))
+  if 'content' not in response_args:
+    content = loader.render_to_string(template, dictionary=context)
+    response_args['content'] = content.strip('\n')
+
   http_response = http.HttpResponse(**response_args)
 
   if response_headers: