#27011: Django Middleware 1.10 does not run template_context_processors for
exceptions thrown from middleware
-------------------------------------+-------------------------------------
     Reporter:  agronick             |                    Owner:  nobody
         Type:  Uncategorized        |                   Status:  new
    Component:  HTTP handling        |                  Version:  1.10
     Severity:  Release blocker      |               Resolution:
     Keywords:  django middleware    |             Triage Stage:  Accepted
  1.10                               |
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by timgraham):

 I'm not about to replicate this behavior in my own tests. Could you
 provide a sample project that reproduces this?

 I created a custom `403.html` template that includes `{{ STATIC_URL }}`
 and appended a middleware that looks like this to `settings.MIDDLEWARE`:
 {{{
 from django.core.exceptions import PermissionDenied
 from django.utils.deprecation import MiddlewareMixin

 class Middleware(MiddlewareMixin):
     def process_request(self, request):
         raise PermissionDenied
 }}}
 I see the `STATIC_URL` on the rendered page.

--
Ticket URL: <https://code.djangoproject.com/ticket/27011#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 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/066.9bfcc54f82669d561de576023a6af0e5%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to