[Django] #20667: Tutorial 6: Note on debug flag

7 views
Skip to first unread message

Django

unread,
Jun 27, 2013, 11:49:32 AM6/27/13
to django-...@googlegroups.com
#20667: Tutorial 6: Note on debug flag
-------------------------------+--------------------
Reporter: sosdog88@… | Owner: nobody
Type: New feature | Status: new
Component: Documentation | Version: 1.5
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------+--------------------
Hey,

Just finished reading tutorial 6 - one of the earlier tutorials alluded to
switching the 'debug' flag to false, which I did - problematically, this
stops automatic static file hosting on the development server! (I found
this out by looking at the linked notes on static hosting, which were very
good though.)

Would it be worth including a note about the setting of the debug flag in
tutorial 6?

Cheers!

--
Ticket URL: <https://code.djangoproject.com/ticket/20667>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jun 27, 2013, 2:01:15 PM6/27/13
to django-...@googlegroups.com
#20667: Tutorial 6: Note on debug flag
-------------------------------+--------------------------------------

Reporter: sosdog88@… | Owner: nobody
Type: New feature | Status: new
Component: Documentation | Version: 1.5
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by timo):

* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0


Comment:

I'd actually be more inclined to remove the mention of turning `DEBUG` to
`False` as that has caused other problems in the past, most notably with
`ALLOWED_HOSTS`. Of course if we did that, we'd probably want to remove
the sections about "Write a 404 (page not found) view" and "Write a 500
(server error) view". Not sure these topics really need to be mentioned in
the tutorial though. Curious to hear other opinions.

--
Ticket URL: <https://code.djangoproject.com/ticket/20667#comment:1>

Django

unread,
Jun 27, 2013, 2:09:19 PM6/27/13
to django-...@googlegroups.com
#20667: Tutorial 6: Note on debug flag
-------------------------------+--------------------------------------

Reporter: sosdog88@… | Owner: nobody
Type: New feature | Status: new
Component: Documentation | Version: 1.5
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------+--------------------------------------

Comment (by carljm):

Replying to [comment:1 timo]:


> I'd actually be more inclined to remove the mention of turning `DEBUG`
to `False` as that has caused other problems in the past, most notably
with `ALLOWED_HOSTS`. Of course if we did that, we'd probably want to
remove the sections about "Write a 404 (page not found) view" and "Write a
500 (server error) view". Not sure these topics really need to be
mentioned in the tutorial though. Curious to hear other opinions.

I agree. These topics are out of place in the tutorial. Now that we have a
deployment checklist (which already discusses `ALLOWED_HOSTS` and `DEBUG`
anyway) I think it would make a lot more sense to move the discussion of
writing 404 and 500 templates there, and don't change `DEBUG` in the
tutorial at all.

I think the tutorial should also link to the deployment checklist
prominently in the "what to read next" page ("when you're ready to deploy
this project for public use, here are the steps you'll need to think
about").

--
Ticket URL: <https://code.djangoproject.com/ticket/20667#comment:2>

Django

unread,
Jun 27, 2013, 2:42:45 PM6/27/13
to django-...@googlegroups.com
#20667: Tutorial 6: Note on debug flag
-------------------------------+--------------------------------------

Reporter: sosdog88@… | Owner: nobody
Type: New feature | Status: new
Component: Documentation | Version: 1.5
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------+--------------------------------------

Comment (by aaugustin):

+1 on Carl's plan.

The section about 404 and 500 templates that comes very early in the
tutorial often confuses beginners.

--
Ticket URL: <https://code.djangoproject.com/ticket/20667#comment:3>

Django

unread,
Jun 28, 2013, 4:00:48 AM6/28/13
to django-...@googlegroups.com
#20667: Tutorial 6: Note on debug flag
-------------------------------+------------------------------------

Reporter: sosdog88@… | Owner: nobody
Type: New feature | Status: new
Component: Documentation | Version: 1.5
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------+------------------------------------
Changes (by claudep):

* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/20667#comment:4>

Django

unread,
Jun 28, 2013, 5:12:00 PM6/28/13
to django-...@googlegroups.com
#20667: Remove discussion of DEBUG from the tutorial
--------------------------------------+------------------------------------
Reporter: sosdog88@… | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by timo):

* cc: timograham@… (added)
* has_patch: 0 => 1
* version: 1.5 => master
* type: New feature => Cleanup/optimization


--
Ticket URL: <https://code.djangoproject.com/ticket/20667#comment:5>

Django

unread,
Jun 29, 2013, 4:48:22 AM6/29/13
to django-...@googlegroups.com
#20667: Remove discussion of DEBUG from the tutorial
--------------------------------------+------------------------------------
Reporter: sosdog88@… | Owner: susan
Type: Cleanup/optimization | Status: assigned

Component: Documentation | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by susan):

* owner: nobody => susan
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/20667#comment:6>

Django

unread,
Jun 29, 2013, 5:18:50 AM6/29/13
to django-...@googlegroups.com
#20667: Remove discussion of DEBUG from the tutorial
--------------------------------------+------------------------------------
Reporter: sosdog88@… | Owner: susan
Type: Cleanup/optimization | Status: assigned
Component: Documentation | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by claudep):

* needs_better_patch: 0 => 1


Comment:

+1 to remove the matching sections in the tutorial. However, in the
checklist, I'd rather stress the usefulness of custom templates
(`404.html`, `500.html`) instead of custom views (which as stated are OK
for 99% of cases).

--
Ticket URL: <https://code.djangoproject.com/ticket/20667#comment:7>

Django

unread,
Jun 29, 2013, 8:18:40 PM6/29/13
to django-...@googlegroups.com
#20667: Remove discussion of DEBUG from the tutorial
--------------------------------------+------------------------------------
Reporter: sosdog88@… | Owner: susan
Type: Cleanup/optimization | Status: assigned
Component: Documentation | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by timo):

* needs_better_patch: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/20667#comment:8>

Django

unread,
Jun 30, 2013, 2:30:36 PM6/30/13
to django-...@googlegroups.com
#20667: Remove discussion of DEBUG from the tutorial
-------------------------------------+-------------------------------------
Reporter: sosdog88@… | Owner:
Type: | Status: new
Cleanup/optimization | Version: master
Component: Documentation | Resolution:
Severity: Normal | Triage Stage: Ready for
Keywords: | checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by claudep):

* status: assigned => new
* owner: susan =>
* stage: Accepted => Ready for checkin


Comment:

Great, thanks!

--
Ticket URL: <https://code.djangoproject.com/ticket/20667#comment:9>

Django

unread,
Jun 30, 2013, 2:56:35 PM6/30/13
to django-...@googlegroups.com
#20667: Remove discussion of DEBUG from the tutorial
-------------------------------------+-------------------------------------
Reporter: sosdog88@… | Owner: Tim
Type: | Graham <timograham@…>
Cleanup/optimization | Status: closed
Component: Documentation | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
Has patch: 1 | checkin
Needs tests: 0 | Needs documentation: 0
Easy pickings: 1 | Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* owner: => Tim Graham <timograham@…>
* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"3493f18d7850236dcb6292ebb1b949d6aeed7a9c"]:
{{{
#!CommitTicketReference repository=""
revision="3493f18d7850236dcb6292ebb1b949d6aeed7a9c"
[1.6.x] Fixed #20667 - Removed discussion of DEBUG from tutorial.

Backport of 0d642aac86 from master.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/20667#comment:10>

Django

unread,
Aug 1, 2013, 6:08:26 PM8/1/13
to django-...@googlegroups.com
#20667: Remove discussion of DEBUG from the tutorial
-------------------------------------+-------------------------------------
Reporter: sosdog88@… | Owner: Tim
Type: | Graham <timograham@…>
Cleanup/optimization | Status: closed
Component: Documentation | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
Has patch: 1 | checkin
Needs tests: 0 | Needs documentation: 0
Easy pickings: 1 | Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"31ee1207877578ad683c1d4f3aed47fc6dc7637e"]:
{{{
#!CommitTicketReference repository=""
revision="31ee1207877578ad683c1d4f3aed47fc6dc7637e"


Fixed #20667 - Removed discussion of DEBUG from tutorial.

Forward-port of 3493f18d78 from master.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/20667#comment:11>

Reply all
Reply to author
Forward
0 new messages