May 27, 2013

Syncdb without creating a superuser in Django

I believe you have various situations when you require your syncdb command to be executed without creating a superuser, or prompting anything. Most obvious example is a scripting of some kind. E.g. custom deployment script. For this you have a --noinput option. You can then populate your db from json or someth. Like the one that is made with --dumpdata option.

To run your syncdb without propting for creation of a superuser you need to run:
python manage.py syncdb --noinput

To upgrade PIP to the latest version

Often forgetting this:


sudo easy_install -U pip