Commits

mitar committed 8a63513

Made dynamic rendering default.

  • Participants
  • Parent commits 5aa0cb7

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
 ~~~~~~~~~~~~~~~~