简体   繁体   English

从管理员注销时,Django CMS占位符内容未显示在页面上

[英]Django CMS placeholder content not showing up on page when i log out from the admin

I'm having trouble with placeholders Django-CMS. 我在使用占位符Django-CMS时遇到了麻烦。 I have used placeholders all over my templates of my existing project and they seem to work just fine when I'm logged in, I can add and edit plugins but when I log out all the edits don't show up on the templates anymore. 我在现有项目的所有模板上都使用了占位符,当我登录时,它们似乎可以正常工作,可以添加和编辑插件,但是注销后,所有编辑都不会再显示在模板上。

What might be causing this? 是什么原因造成的? I have followed the placeholder creation procedure and published all my changes. 我遵循了占位符创建过程并发布了所有更改。

Consider the following scenario; 考虑以下情形; I have {% placeholder "feature" %} on my template, the plugin is visible on the page and editable but the content only shows up on the website page when I'm logged in. 我的模板上有{% placeholder "feature" %} ,该插件在页面上可见并且可以编辑,但是仅当我登录时内容才会显示在网站页面上。

Maybe cache? 也许缓存? In your plugin you could add the line cache = False , like: 在您的插件中,您可以添加以下行cache = False

    class YourPlugin(CMSPluginBase):
        model = Yourmodel ...
        cache = False

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM