#30825: Confusing message on the default Django home page mentioning the debug
settings
-------------------------------------+-------------------------------------
     Reporter:  Therry van Neerven   |                    Owner:  KESHAV
                                     |  KUMAR
         Type:  Bug                  |                   Status:  closed
    Component:  Uncategorized        |                  Version:  2.2
     Severity:  Normal               |               Resolution:
                                     |  worksforme
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  1                    |                    UI/UX:  1
-------------------------------------+-------------------------------------

Comment (by Therry van Neerven):

 Replying to [comment:4 Carlton Gibson]:
 > The debug view is **not** shown when `DEBUG=False`. Instead a generic
 404 is show.
 >
 > Unless you can provide reproduce steps, this isn't something we need to
 fix.


 I've checked our project and I found out that the issue was caused by the
 configuration of the default_urlconf at the root url:


 {{{
 from django.contrib import admin
 from django.urls import path
 from django.views.debug import default_urlconf

 urlpatterns = [
     path('', default_urlconf),
     path('admin/', admin.site.urls),
 ]
 }}}

 The problem is caused by the fact that the Template engine is
 
[https://github.com/django/django/blob/103a6f4307b4402198b03d79c683e195686572e1/django/views/debug.py#L22
 different for this view]:


 {{{
 # Minimal Django templates engine to render the error templates
 # regardless of the project's TEMPLATES setting. Templates are
 # read directly from the filesystem so that the error handler
 # works even if the template loader is broken.
 DEBUG_ENGINE = Engine(
     debug=True,
     libraries={'i18n': 'django.templatetags.i18n'},
 )
 }}}

 I'm in favor of considering this a configuration error from the user's
 side. However if a better message can be provided that would be nice.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30825#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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.6e9052566c73f67473f9d8595d1e09e3%40djangoproject.com.

Reply via email to