sample static folder when creating project
|Reported by:||Julien Bouquillon||Owned by:||nobody|
|Component:||Core (Management commands)||Version:||1.4|
|Cc:||ke1g||Triage Stage:||Design decision needed|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
When beginners starts their first django project, they struggle at their first staticfiles setup.
- the official tuto doesnt even talk about static files
- they usually have to hardcode the path in settings.py
- they usually have to add an entry to their urls.py
- they have to understand all the staticfiles process and complexity and long doc before using a single CSS or image
So i was wondering what do you guys think about setting up a "default" static dir when creating a new project with django-admin.py
This would just be a demo folder, with a sample image, but working without pain for the beginners.
this could be implemented like this (from the project_template) :
- add a /static folder in the project directory with a sample image
- add an entry for staticfiles to project.urls.py
- setup the correct settings
Advantages of this would be :
- less friction for beginners
- demonstration of good practices when dealing with static files (security, names..)
- better understanding on staticfiles capabilities
My goal is to make django beginners feel more confortable
An idea/suggestion ?