Ask Your Question

CommandError: Please create a superuser to continue

asked 2014-11-16 16:00:30 -0500

anonymous user



I followed along the documentation, and when i tried to do db migrations, it throws error "CommandError: Please create a superuser to continue". I am using django 1.5.7 and postgresql. I do have a superuser created when i run syncdb. Any idea?

Running migrations for askbot:

- Migrating forwards to 0179_sanitize_user_info_html.

askbot:0133_apply_global_group_to_posts_and_users Error in migration: askbot:0133_apply_global_group_to_posts_and_users CommandError: Please create a superuser to continue

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-11-16 16:22:48 -0500

Evgeny's avatar

updated 2014-11-16 19:14:44 -0500

Looks like there is a bug in this migration, for the time being it should be ok to skip it by:

python migrate askbot 0133 --fake
python migrate askbot

P.S. To init the database one can use python syncdb --migrate --noinput this command runs syncdb and migrate, without creating superuser and avoids some issues (Which are in the there and need to be fixed). I've not noticed them until recently because of the habit of using the command above.

edit flag offensive delete link more


Hi Evgeny, Thanks for your help. I actually used "python add_admin 1" to fix the issue per your documentation. Now, I have another issue. It seems that I cant get into settings page. it throws "DoesNotExist at /settings/MIN_REP/ Site matching query does not exist." I do have site_id = 1 and django sites app included in installed app. Any idea?

johnli's avatar johnli  ( 2014-11-16 16:51:28 -0500 )edit

for some reason, syncdb doesnt create site object in database, so i manually create one from shell, and solve the site matching query issue.

johnli's avatar johnli  ( 2014-11-16 18:16:44 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2014-11-16 16:00:30 -0500

Seen: 4,734 times

Last updated: Nov 16 '14