First time here? Check out the FAQ!

CommandError: Please create a superuser to continue

  • retag add tags


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

anonymous user
asked 2014-11-16 16:00:30 -0500
edit flag offensive 0 remove flag close merge delete


add a comment see more comments

1 Answer


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.

Evgeny's avatar
answered 2014-11-16 16:22:48 -0500, updated 2014-11-16 19:14:44 -0500
edit flag offensive 0 remove flag delete link


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
add a comment see more comments