#1755 closed enhancement (wontfix)
[patch] make 'manage.py syncdb' not wait for user input
Reported by: | medhat | Owned by: | Adrian Holovaty |
---|---|---|---|
Component: | Core (Management commands) | Version: | dev |
Severity: | trivial | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
This will be mainly useful for developers who are constantly changing their model and rebuilding the database.
When doing the development I use sqlite, and I have a batch file that I run to delete the database and then run 'manage.py syncdb' to recreate the model with all the changes that I have done. It will be nicer if syncdb does not ask for user input (right now it asks for a user to create.) Maybe it should read its input from some configuration file (settings.py is a good candidate.) Along with this, it will be also nice if instead of just creating 'example.com' it would read the site name from settings.py also.
Attachments (1)
Change History (6)
by , 19 years ago
Attachment: | django_1755.patch added |
---|
comment:1 by , 19 years ago
Version: | → SVN |
---|
comment:2 by , 19 years ago
Summary: | make 'manage.py syncdb' not wait for user input → [patch] make 'manage.py syncdb' not wait for user input |
---|
comment:3 by , 19 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
comment:4 by , 19 years ago
As an alternative solution, a script can use Django's dispatcher to disconnect the event django/contrib/auth/management.py fires when the table is created.
comment:5 by , 19 years ago
http://code.djangoproject.com/wiki/CookBookScriptsNoSuperUserSyncdb shows how to do it.
I'm not a huge fan of putting a plaintext default password in the default settings file. Also, you can avoid the problem you're having by only resetting the tables in the app you're changing, not all apps. (E.g.,
manage.py sqlreset
.)