Provide a boiler plate free ./manage.py startapp command
|Reported by:||anonymous||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Django still requires a lot of boiler plate to start with.
Running manage.py startapp could ask questions just like manage.py syncdb does to create super user, such as :
- do you want to create a hello_world view and template ? (this will create a views.hello, app/templates/app/base.html and app/templates/app/hello.html files and an entry in app/urls.py if it exists)
- do you want to add the app to INSTALLED_APPS ? (this will copy it the first INSTALLED_APPS it founds and appears only if you don't have more than a simple settings.py file)
- do you want to add the app to the project urlconf ? (this will appears only if you have nothing more than a simple project/urls.py file)
Then it prints what it did with full path to edited files, so people can actually SEE how you bootstrap an app.
If you choose no to any of theses question, the command gives you helpful clues such as :
"You may want to add this app to your INSTALLED_APPS and project.urls.py"
Of course you can disable all that stuff with --noinput.
Change History (10)
comment:1 Changed 21 months ago by russellm
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Resolution set to wontfix
- Status changed from new to closed