Skip to content

Commit d9f6f73

Browse files
fp4codeFinalAngel
authored andcommitted
Added parameter DJANGOCMS_SNIPPET_CACHE (#47)
* Fixed error message outputs in html page (#45) * Added parameter DJANGOCMS_SNIPPET_CACHE
1 parent 3232fae commit d9f6f73

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

README.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ to edit the snippet content. You can customize the
7575
DJANGOCMS_SNIPPET_THEME = 'github'
7676
DJANGOCMS_SNIPPET_MODE = 'html'
7777

78+
If dynamic content is inserted (for example ``{% show_menu ... %}``), the plugin cache must be disabled,
79+
please set ``DJANGOCMS_SNIPPET_CACHE`` to ``False`` in your settings::
80+
81+
DJANGOCMS_SNIPPET_CACHE = False # default value is True
7882

7983
Template tag
8084
------------

djangocms_snippet/cms_plugins.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ class SnippetPlugin(CMSPluginBase):
1717
render_template = 'djangocms_snippet/snippet.html'
1818
text_enabled = True
1919
text_editor_preview = False
20+
cache = getattr(settings, 'DJANGOCMS_SNIPPET_CACHE', True)
2021

2122
def render(self, context, instance, placeholder):
2223
context.update({

0 commit comments

Comments
 (0)