Wagtail 在 Wagtail 管理中尝试创建新页面时说 "Page not found"
Wagtail says "Page not found" when trying to create a new page in Wagtail admin
当我尝试在 Wagtail 管理中创建新页面时出现以下错误:
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
...
我做错了什么?
您忘记迁移了。 运行:
$ python manage.py makemigrations
$ python manage.py migrate
我花了将近一个小时的时间在 table 上苦苦思索,试图弄清楚这个问题。
当我尝试在 Wagtail 管理中创建新页面时出现以下错误:
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
...
我做错了什么?
您忘记迁移了。 运行:
$ python manage.py makemigrations
$ python manage.py migrate
我花了将近一个小时的时间在 table 上苦苦思索,试图弄清楚这个问题。