#18105: Investigate possible misuse of Context
--------------------------------------+------------------------------------
Reporter: aaugustin | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Template system | Version: 1.4
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Comment (by aaugustin):
[73317883] changed `render_to_response` so it wouldn't rewrap a `Context`
inadvertently passed in the `dictionary` argument in another `Context`.
That's the opposite of the route taken by first patch above and I'm
convinced it's a better approach given how widespread `render_to_response`
is and how easy forgetting `context_instance=` is.
The second patch still warrants consideration. I had a look and I don't
think the code inside `if isinstance(_dict, BaseContext)` is correct: it
adds values such as `autoescape` and `current_app` to the context when
they're intended to be attributes of the context object.
--
Ticket URL: <https://code.djangoproject.com/ticket/18105#comment:5>
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.0ed847bcef79150d30d0893c4f319747%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.