#1504: Allow render_to_response() to take a content-type param
------------------------------------+---------------------------------------
   Reporter:  [EMAIL PROTECTED]  |                Owner:  adrian    
     Status:  closed                |            Component:  Tools     
    Version:                        |           Resolution:  wontfix   
   Keywords:                        |                Stage:  Unreviewed
  Has_patch:  0                     |           Needs_docs:  0         
Needs_tests:  0                     |   Needs_better_patch:  0         
------------------------------------+---------------------------------------
Comment (by anonymous):

 I came here via a Google Search and the above helped, but is slightly
 incorrect.
 
 As stated above you can modify a HttpResponse object before returning it.
 All HTTPResponse objects have a dictionary called "headers". So to change
 the HTTPResponse into XML.
 
 {{{
 r = render_to_response('imageview/gallery', context_dict)
 r.headers['Content-Type'] = 'text/xml; charset=utf-8'
 return r
 }}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/1504#comment:3>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" 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-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to