Opened 3 years ago
Last modified 8 months ago
#33650 new Cleanup/optimization
Update startproject template with config directory and custom user model — at Initial Version
Reported by: | Timothy Allen | Owned by: | nobody |
---|---|---|---|
Component: | Core (Management commands) | Version: | dev |
Severity: | Normal | Keywords: | startproject, template |
Cc: | John Speno, Salaah Amin, Ülgen Sarıkavak | Triage Stage: | Someday/Maybe |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I propose that we make makes two changes to the startproject
template:
- instead of putting configuration files such as
settings.py
,wsgi.py
, and the rooturls.py
inmy_project/my_project
, usemy_project/config
- start the project with a custom User model app,
users
Over the years, I've taught or tutored over 100 Djangonauts starting their first project. These two pain points came up the most frequently. Having to explain and distinguish between two directories with the same name is a constant pain point in the teaching process - "cd into my_project ... no, the other one!"
It is sometimes better to show rather than tell, so following our own documentation and including a custom User model with the initial project template reinforces the best practice that we explicitly point out in the documentation.