New root page in wagtail

心不动则不痛 提交于 2021-02-07 09:51:47

问题


I want to change the Root page in Wagtail.

  1. I have deleted the default home page
  2. Created another page assigned "home" as slug.
  3. Created a template my_page_name_home.html

But I am getting 404 all the time when I try http://localhost:8000/. Do I have to change the urls.py patterns?

I am doing this because of Wagtailtrans add-on. In order to work i have to redirect away from the homepage to my new page ot type TranslatableSiteRootPage


回答1:


You need to go to Settings -> Sites in the Wagtail admin, and add a site record to associate 'localhost' to your new homepage. (A site record for this exists on the default installation, but this would have been deleted when you deleted the default homepage.)



来源:https://stackoverflow.com/questions/45920803/new-root-page-in-wagtail

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!