Friday 29 May 2020

Wagtail: 'no such table' fix

When following the tutorial on setting up a blog in Wagtail I was getting the following issue when trying to add my Child blog page.

"no such table 'blog_blogindexpage' "

I'm not sure why but I couldn't fix just by changing my Models.py .  It didn't seem to be reading it all .  So I had to do the following 

1. Delete all my migrations in the blog/migrations table. 
2. Make sure the Class  BlogIndexPage 
 is in my 'models.py'
3. Run the following commands 

python manage.py makemigrations blog
python manage.py migrate

No comments: