Code

Opened 13 months ago

Closed 13 months ago

Last modified 11 months 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 timo 13 months ago.

Download all attachments as: .zip

Change History (12)

comment:1 follow-up: Changed 13 months ago by timo

  • 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 13 months ago by carljm

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 13 months ago by aaugustin

+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 13 months ago by claudep

  • Triage Stage changed from Unreviewed to Accepted

comment:5 Changed 13 months ago by timo

  • Cc timograham@… added
  • Has patch set
  • Summary changed from Tutorial 6: Note on debug flag to Remove discussion of DEBUG from the tutorial
  • Type changed from New feature to Cleanup/optimization
  • Version changed from 1.5 to master

comment:6 Changed 13 months ago by susan

  • Owner changed from nobody to susan
  • Status changed from new to assigned

comment:7 Changed 13 months ago by claudep

  • 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 13 months ago by timo

comment:8 Changed 13 months ago by timo

  • Patch needs improvement unset

comment:9 Changed 13 months ago by claudep

  • Owner susan deleted
  • Status changed from assigned to new
  • Triage Stage changed from Accepted to Ready for checkin

Great, thanks!

comment:10 Changed 13 months ago by Tim Graham <timograham@…>

  • Owner set to Tim Graham <timograham@…>
  • Resolution set to fixed
  • Status changed from new to closed

In 3493f18d7850236dcb6292ebb1b949d6aeed7a9c:

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

Backport of 0d642aac86 from master.

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

In 31ee1207877578ad683c1d4f3aed47fc6dc7637e:

Fixed #20667 - Removed discussion of DEBUG from tutorial.

Forward-port of 3493f18d78 from master.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.