mirror of
https://github.com/django/django.git
synced 2025-08-03 10:34:04 +00:00
[1.5.x] Fixed #19875 - Added warnings regarding DEBUG=False and empty ALLOWED_HOSTS
Backport of 4e94c84e50
from master
This commit is contained in:
parent
3bd9852401
commit
46dacb5bb1
3 changed files with 16 additions and 0 deletions
|
@ -468,6 +468,13 @@ template for all 404 errors when :setting:`DEBUG` is set to ``False`` (in your
|
|||
settings module). If you do create the template, add at least some dummy
|
||||
content like "Page not found".
|
||||
|
||||
.. warning::
|
||||
|
||||
If :setting:`DEBUG` is set to ``False``, all responses will be
|
||||
"Bad Request (400)" unless you specify the proper :setting:`ALLOWED_HOSTS`
|
||||
as well (something like ``['localhost', '127.0.0.1']`` for
|
||||
local development).
|
||||
|
||||
A couple more things to note about 404 views:
|
||||
|
||||
* If :setting:`DEBUG` is set to ``True`` (in your settings module) then your
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue