#25839: RequestContext does not apply context processors [regression] ---------------------------------+---------------------------------------- Reporter: direx | Owner: nobody Type: Bug | Status: new Component: Template system | Version: 1.8 Severity: Release blocker | Keywords: RequestContext, regression Triage Stage: Unreviewed | Has patch: 0 Easy pickings: 0 | UI/UX: 0 ---------------------------------+---------------------------------------- Prior to Django 1.8 `django.template.RequestContext` always had the context from all of the `TEMPLATE_CONTEXT_PROCESSORS` applied. In Django 1.8 this is no longer the case, which breaks the API. As this has neither been announced nor documented anywhere I'd consider this a critical regression.
The following view code no longer works with the default `TEMPLATE_CONTEXT_PROCESSORS` setting: {{{ from django.template import RequestContext def my_view(request): context = RequestContext(request) print context['user'] #... }}} Actually `user` should be put there by `django.contrib.auth.context_processors.auth`. It is also present in templates rendered by `render()`, but not in `RequestContext`. Of course this does not only apply to the `user` context variable, but to all context variables set by context processors. -- Ticket URL: <https://code.djangoproject.com/ticket/25839> 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 django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/048.97f815dd5696135d05a83b47a7eadd57%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.