mitar avatar mitar committed 8a63513

Made dynamic rendering default.

Comments (0)

Files changed (3)

cmsplugin_markup/conf/global_settings.py

         'cmsplugin_markup.plugins.textile',
         'cmsplugin_markup.plugins.restructuredtext',
 )
+
+CMS_MARKUP_RENDER_ALWAYS = True

cmsplugin_markup/models.py

             choices=MARKUP_CHOICES,
             default=MARKUP_CHOICES[0][0] if len(MARKUP_CHOICES) == 1 else models.NOT_PROVIDED,
             )
-    dynamic = models.BooleanField(_('Render every time'), default=False, help_text=_('Should be the content rendered every time the page is displayed or should it be rendered only when saved?'))
+    dynamic = models.BooleanField(_('Render every time'), default=settings.CMS_MARKUP_RENDER_ALWAYS, help_text=_('Should be the content rendered every time the page is displayed or should it be rendered only when saved?'))
 
     search_fields = ('body_html',)
 

docs/backends.rst

 
 Each entry should be a string and should be a complete path to a python package that contains the required attributes.
 
+You can also configure what is a default value for markups which support dynamically rendered output, using ``CMS_MARKUP_RENDER_ALWAYS`` setting (by default ``True``).
+
 Backend API
 -----------
 
 
 ``plugin_regexp(self)`` should return JavaScript code for anonymous function which construct plugin regexp given plugin_id. It should be marked as safe to prevent escaping.
 
-Some markups support dynamically rendered output (like macros) which could be rendered every time differently. If your markup supports this you can set ``is_dynamic`` to ``True`` and this will then give users an option to enable rendering of the content every time the page (Markup plugin) is displayed. Otherwise the content is rendered only once, when saved.
+Some markups support dynamically rendered output (like macros) which could be rendered every time differently. If your markup supports this you can set ``is_dynamic`` to ``True`` and this will then give users an option to enable rendering of the content every time the page (Markup plugin) is displayed (default value is configured by ``CMS_MARKUP_RENDER_ALWAYS`` setting). Otherwise the content is rendered only once, when saved.
 
 Directory Layout
 ~~~~~~~~~~~~~~~~
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.