Ask Your Question
0

CommandError: Please create a superuser to continue

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

anonymous user

Anonymous

Hi,

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
0

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

Evgeny gravatar image

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

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

python manage.py migrate askbot 0133 --fake
python manage.py migrate askbot

P.S. To init the database one can use python manage.py 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

Comments

Hi Evgeny, Thanks for your help. I actually used "python manage.py 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 gravatar imagejohnli ( 2014-11-16 16:51:28 -0600 )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 gravatar imagejohnli ( 2014-11-16 18:16:44 -0600 )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

Stats

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

Seen: 4,653 times

Last updated: Nov 16 '14