Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#20667 closed Cleanup/optimization (fixed)

Remove discussion of DEBUG from the tutorial

Reported by: sosdog88@… Owned by: Tim Graham <timograham@…>
Component: Documentation Version: master
Severity: Normal Keywords:
Cc: timograham@… Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

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!

Attachments (1)

20667.diff (5.7 KB) - added by Tim Graham 3 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 3 years ago by Tim Graham

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset

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.

comment:2 in reply to:  1 Changed 3 years ago by Carl Meyer

Replying to 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").

comment:3 Changed 3 years ago by Aymeric Augustin

+1 on Carl's plan.

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

comment:4 Changed 3 years ago by Claude Paroz

Triage Stage: UnreviewedAccepted

comment:5 Changed 3 years ago by Tim Graham

Cc: timograham@… added
Has patch: set
Summary: Tutorial 6: Note on debug flagRemove discussion of DEBUG from the tutorial
Type: New featureCleanup/optimization
Version: 1.5master

comment:6 Changed 3 years ago by Susan Tan

Owner: changed from nobody to Susan Tan
Status: newassigned

comment:7 Changed 3 years ago by Claude Paroz

Patch needs improvement: set

+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).

Changed 3 years ago by Tim Graham

Attachment: 20667.diff added

comment:8 Changed 3 years ago by Tim Graham

Patch needs improvement: unset

comment:9 Changed 3 years ago by Claude Paroz

Owner: Susan Tan deleted
Status: assignednew
Triage Stage: AcceptedReady for checkin

Great, thanks!

comment:10 Changed 3 years ago by Tim Graham <timograham@…>

Owner: set to Tim Graham <timograham@…>
Resolution: fixed
Status: newclosed

In 3493f18d7850236dcb6292ebb1b949d6aeed7a9c:

[1.6.x] Fixed #20667 - Removed discussion of DEBUG from tutorial.

Backport of 0d642aac86 from master.

comment:11 Changed 3 years ago by Tim Graham <timograham@…>

In 31ee1207877578ad683c1d4f3aed47fc6dc7637e:

Fixed #20667 - Removed discussion of DEBUG from tutorial.

Forward-port of 3493f18d78 from master.

Note: See TracTickets for help on using tickets.
Back to Top