28
Nov
11

django create superuser automatically on syncdb



Found the following information here. Here’s how you can automatically create a superuser when syncing your db:


python manage.py dumpdata auth > initial_data.json 
python manage.py syncdb

Make sure to modify the initial.json file, if you want to change the name/mail of the superuser.

Advertisements

0 Responses to “django create superuser automatically on syncdb”



  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Blog Stats

  • 228,119 hits

%d bloggers like this: