#32637: Http404 exception messages might not be propagating to 404 debug 
templates
in Django 3.2
-----------------------------------------+------------------------
               Reporter:  Atul Varma     |          Owner:  nobody
                   Type:  Bug            |         Status:  new
              Component:  Uncategorized  |        Version:  3.2
               Severity:  Normal         |       Keywords:
           Triage Stage:  Unreviewed     |      Has patch:  0
    Needs documentation:  0              |    Needs tests:  0
Patch needs improvement:  0              |  Easy pickings:  0
                  UI/UX:  0              |
-----------------------------------------+------------------------
 Hello!  I'm currently upgrading a project from Django 2.2 to 3.2 (a bit
 sloppily, as I'm not incrementally upgrading to intermediate versions).  I
 noticed that a few of my tests rely on the following behavior specified in
 the documentation for the Http404 exception:

 > When DEBUG is True, you can provide a message to Http404 and it will
 appear in the standard 404 debug template. Use these messages for
 debugging purposes; they generally aren’t suitable for use in a production
 404 template.

 I was able to test whether the message I passed was visible on the debug
 404 page for the view (to make sure the page was 404'ing for the right
 reason).  However, these tests have broken when upgrading to Django 3.2.
 Looking at the actual response content, it doesn't seem as though the
 actual message is visible anywhere on the page.

 I'm currently just going to comment out the explicit test for finding the
 exception message, but I was curious if anyone else has found this kind of
 error as well, or if it's just me.  If needed, I can try creating a simple
 test case that reproduces this error (though I'll admit the problem could
 be entirely on my end too).

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32637>
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/051.eb95783ed352d173046b518a3137e4db%40djangoproject.com.

Reply via email to