How would you run this django command to syncdb with fabric automatically.
python manage.py syncdb --settings="app.settings.test"
if tried to do run, it gets stuck at the "Do you want to create superuser account", can it passed as yes and login information with it.
run('python manage.py syncdb --settings="app.settings.%s"' % name, pty=True)
Add --noinput
to the arguments to keep django-admin from prompting:
python manage.py syncdb --settings="app.settings.%s" --noinput
If you have specific credentials that you'd like to preload always, I suspect the simplest way to achieve that would be to create a data dump of the user database from a machine with (just!) the admin account loaded, and then to load that in after syncdb. Alternatively, you could simply leave out the admin account and add it later with manage.py createsuperuser
when and if you need to have it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With