Opened 7 years ago

Closed 7 years ago

#19697 closed New feature (fixed)

Add an overview of good practices for production settings

Reported by: Aymeric Augustin Owned by: Aymeric Augustin
Component: Documentation Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Quoting Claude:

add a section in the docs where we explain what settings should be typically added in deployed projects, but not suitable in public repositories (DEBUG=False, DATABASES, STATIC_ROOT, SECRET_KEY, ADMINS, SERVER_EMAIL, etc.) and link to this section in the template.

Change History (8)

comment:1 Changed 7 years ago by Aymeric Augustin

Triage Stage: UnreviewedAccepted

This was discussed in the context of the new project template. A link to that document should be added below the comment that reads: "# Quick-start development settings - unsuitable for production".

comment:2 Changed 7 years ago by Carl Meyer

Lukasz Langa mentioned in IRC today that it would be good to document that most production sites probably want to use the caching template loader. This isn't exactly something that is "not suitable in public repositories", but it fits in a slightly broader document about "things you probably want to do when you go to production." Using the caching loader in development is painful because you don't get template updates until a reload, but almost all sites probably should be using it in production.

comment:3 Changed 7 years ago by Carl Meyer

Also, ALLOWED_HOSTS definitely belongs here; see #19875

comment:4 Changed 7 years ago by Aymeric Augustin

This is an excellent start, thank you!

A few suggestions:

  • add an introduction explaining that you probably want a different settings file for development and production
  • group settings by category
    • 1) for security
    • 2) for HTTPS
    • 3) for performance
    • 4) for error reporting
    • add more if necessary
  • look for other production-related settings in the settings list
    • CACHES
    • TEMPLATE_LOADERS => enable the cached template loader
Last edited 7 years ago by Aymeric Augustin (previous) (diff)

comment:5 Changed 7 years ago by Aymeric Augustin

Pull request re-sent together here:

comment:6 Changed 7 years ago by Aymeric Augustin

Owner: changed from nobody to Aymeric Augustin
Status: newassigned

comment:7 Changed 7 years ago by Aymeric Augustin

Has patch: set

comment:8 Changed 7 years ago by Aymeric Augustin <aymeric.augustin@…>

Resolution: fixed
Status: assignedclosed

In 912b5d2a6bc78067d6a7e130f10514c51bd1a58f:

Fixed #19697 -- Added a deployment checklist.

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