[Django] #25929: render_to_response with RequestContext problem

16 views
Skip to first unread message

Django

unread,
Dec 12, 2015, 3:17:50 PM12/12/15
to django-...@googlegroups.com
#25929: render_to_response with RequestContext problem
----------------------------+--------------------
Reporter: hugotacito | Owner: nobody
Type: Bug | Status: new
Component: Utilities | Version: 1.9
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
----------------------------+--------------------
In django 1.9, I am unable to use render_to_response with RequestContext
without any deprecation warning, I need to use RequestContext because of
the context_processors... Why not add the parameter request to
render_to_response and pass it to render_to_string to solve this issue?
For now, the only way I have to do this is calling:

HttpResponse(render_to_string(template, dict_context, request=request))

--
Ticket URL: <https://code.djangoproject.com/ticket/25929>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Dec 12, 2015, 4:14:40 PM12/12/15
to django-...@googlegroups.com
#25929: render_to_response with RequestContext problem
----------------------------+--------------------------------------

Reporter: hugotacito | Owner: nobody
Type: Bug | Status: new
Component: Utilities | Version: 1.9
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
----------------------------+--------------------------------------
Changes (by aaugustin):

* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0


Comment:

Could you clarify why `render(request, template, dict_context)` doesn't do
what you want?

--
Ticket URL: <https://code.djangoproject.com/ticket/25929#comment:1>

Django

unread,
Dec 12, 2015, 4:27:00 PM12/12/15
to django-...@googlegroups.com
#25929: render_to_response with RequestContext problem
----------------------------+--------------------------------------
Reporter: hugotacito | Owner: nobody
Type: Bug | Status: closed
Component: Utilities | Version: 1.9
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage: Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
----------------------------+--------------------------------------
Changes (by hugotacito):

* status: new => closed
* resolution: => invalid


Comment:

Sorry, I completely forgot about render from shortcuts, I'm gonna close
this...

--
Ticket URL: <https://code.djangoproject.com/ticket/25929#comment:2>

Reply all
Reply to author
Forward
0 new messages