#32637: Technical 404 debug page doesn't display Http404's message in Django 
3.2.
---------------------------------+------------------------------------
     Reporter:  Atul Varma       |                    Owner:  nobody
         Type:  Bug              |                   Status:  new
    Component:  Error reporting  |                  Version:  3.2
     Severity:  Release blocker  |               Resolution:
     Keywords:                   |             Triage Stage:  Accepted
    Has patch:  0                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  0                |                    UI/UX:  0
---------------------------------+------------------------------------
Changes (by Mariusz Felisiak):

 * cc: Jon Dufresne (added)
 * component:  Uncategorized => Error reporting
 * severity:  Normal => Release blocker
 * stage:  Unreviewed => Accepted


Comment:

 Thanks for this report. Technical 404 debug page now always shows tried
 URL patterns, that's why
 
[https://github.com/django/django/blob/e4430f22c8e3d29ce5d9d0263fba57121938d06d/django/views/templates/technical_404.html#L69-L71
 Http404's message] is no longer displayed. IMO we should keep showing  a
 message, e.g.

 {{{
 diff --git a/django/views/templates/technical_404.html
 b/django/views/templates/technical_404.html
 index 077bb20964..aeba2daf9c 100644
 --- a/django/views/templates/technical_404.html
 +++ b/django/views/templates/technical_404.html
 @@ -20,11 +20,13 @@
      #info ol li { font-family: monospace; }
      #summary { background: #ffc; }
      #explanation { background:#eee; border-bottom: 0px none; }
 +    pre.exception_value { font-family: sans-serif; color: #575757; font-
 size: 1.5em; margin: 10px 0 10px 0; }
    </style>
  </head>
  <body>
    <div id="summary">
      <h1>Page not found <span>(404)</span></h1>
 +    {% if reason %}<pre class="exception_value">{{ reason }}</pre>{%
 endif %}
      <table class="meta">
        <tr>
          <th>Request Method:</th>
 @@ -66,8 +68,6 @@
          {% endif %}
          {% if resolved %}matched the last one.{% else %}didn’t match any
 of these.{% endif %}
        </p>
 -    {% else %}
 -      <p>{{ reason }}</p>
      {% endif %}
    </div>
 }}}

 Regression in 11ebc6479ffda87376b60c9475d33d8120f86368.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32637#comment:1>
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/066.53e593f75d961634b2fda681fa7ab6bb%40djangoproject.com.

Reply via email to