gpt4 book ai didi

python - 夹层 CMS 中如何定义页面实例的 slug?

转载 作者:太空宇宙 更新时间:2023-11-04 05:22:37 26 4
gpt4 key购买 nike

来自Mezzanine docs :

By default the template pages/page.html is used, but if a custom template exists it will be used instead. The check for a custom template will first check for a template with the same name as the Page instance’s slug, and if not then a template with a name derived from the subclass model’s name is checked for. So given the above example the templates pages/dr-seuss.html and pages/author.html would be checked for respectively.

问题是 Mezzanine CMS 从哪里获取页面实例的 slug?是来自title属性吗?

最佳答案

默认情况下,slug 是从 title 属性自动生成的,但也可以从页面管理的元数据部分的“URL”选项中手动设置。

关于python - 夹层 CMS 中如何定义页面实例的 slug?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39800065/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com