DatabaseError at /admin/blog/post/

When I get into the admin section of the lesson and I first try to access Posts within the Blog app's section of the admin panel, I get the error mentioned in the post title with the subheader:

relation "blog_post" does not exist

I figured this had something to do with my migration of the Post model (which I was worried I may have initiated incorrectly), so I deleted the /migrations folder from /blog and re-ran the command:

python manage.py schemamigration --initial blog

But the same error pops up when I try to access the blog_posts table from the admin UI. Any suggestions? Maybe steps that get my database back to zero so I can start from scratch?

Sorry You must be a logged in, registered user to answer a question.

Answers

OK, I'm just starting, so I of course may be wrong but I'm pretty confident on this one.

If you want to delete database you should run: dropdb microblog Than recreate it: createdb microblog

Now I guess you could comment out your 'blog' entry in INSTALLED_APPS and run syncdb just to get the South online and recreate admin user. Than uncomment 'blog', run 'python manage.py schemamigration blog --initial' and 'python manage.py migrate'.

This way you will end up with just one migration step (0001) but that's totally fine.

Wow, r3myg thanks so much for the answer. Worked great.
spelman7 on

You say you created the migration, but did you run it too? You have run migrations w/ python manage.py migrate [<app name> <migration name/number>] (the last two are optional).