#29597: AttributeError when django.template.context_processors.debug is invoked
with null request
---------------------------------+--------------------------------------
Reporter: eshellman | Owner: nobody
Type: Bug | Status: closed
Component: Template system | Version: master
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
---------------------------------+--------------------------------------
Changes (by eshellman):
* status: new => closed
* resolution: => invalid
Comment:
Sorry, my bug
this was caused by code that looked like this:
{{{
context = {a_dict}
render_to_string(template_name, {another_dict}, context)
}}}
because the signature of the method is
{{{
def render_to_string(template_name, context=None, request=None,
using=None)
}}}
I missed that request was getting another_dict.
the code was originally targeted at the 1.5.12 signature
{{{
render_to_string(template_name, dictionary=None, context_instance=None)
}}}
but it worked in 1.8, and didn't break till 1.11.
--
Ticket URL: <https://code.djangoproject.com/ticket/29597#comment:2>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/067.d546c848a74f89ca5dd3a7ec8cfb1ab7%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.