How to add a superuser in Django 1.6 from the command line

This python script shows how to add a super user and display all super users in your Django 1.6 installation from the command line. I wrote it to support automated configuration of my django installations.

The script file must reside in the settings.py directory but that can be changed by changing the ‘settings’ argument at line 9.

Note that there are many other user fields (like email) that it does not set.

I hope that you find it helpful.

Leave a Reply