当我尝试在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.
我已将新页面模型添加到models.py
,如下所示:
...
class HomePage(Page):
pass
...
我做错了什么?
答案 0 :(得分:5)
您忘了迁移。运行:
$ python manage.py makemigrations
$ python manage.py migrate
我花了一个小时的时间将我的头撞在桌子上试图弄清楚这个。