Babken Vardanyan
Babken Vardanyan

Reputation: 15030

Wagtail says "Page not found" when trying to create a new page in Wagtail admin

I am getting the following error when I try to create a new page in Wagtail admin:

Page not found (404)
Request Method: GET
Request URL:    http://127.0.0.1:8000/wagtail-admin/pages/add/blog/homepage/1/
Raised by:  wagtail.wagtailadmin.views.pages.create
You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 404 page.

I have added the new page model to models.py like this:

...
class HomePage(Page):
    pass
...

What am I doing wrong?

Upvotes: 4

Views: 3881

Answers (1)

Babken Vardanyan
Babken Vardanyan

Reputation: 15030

You forgot to migrate. Run:

$ python manage.py makemigrations
$ python manage.py migrate

I spent like an hour banging my head on the table trying to figure this one out.

Upvotes: 25

Related Questions