1. Artem Egorkine
  2. zine

Commits

mitsuhiko  committed a2da213

Plugin guard is disabled for development environments by default now and the feature is no longer exposed on the plugin page. If you want to change it, you can do so from the configuration editor.

  • Participants
  • Parent commits b4237de
  • Branches default

Comments (0)

Files changed (3)

File zine/config.py

View file
     'smtp_use_tls':             BooleanField(default=False),
 
     # plugin settings
-    'plugin_guard':             BooleanField(default=True),
+    'plugin_guard':             BooleanField(default=not _dev_mode),
     'plugins':                  CommaSeparated(TextField(), default=list),
     'plugin_searchpath':        CommaSeparated(TextField(), default=list,
         help_text=lazy_gettext(u'It\'s possible to one or more comma '

File zine/forms.py

View file
         if initial is None:
             initial = dict(
                 active_plugins=[x.name for x in app.plugins.itervalues()
-                                if x.active],
-                disable_guard=not app.cfg['plugin_guard']
+                                if x.active]
             )
         forms.Form.__init__(self, initial)
 
         """Apply the changes."""
         t = self.app.cfg.edit()
         t['plugins'] = u', '.join(sorted(self.data['active_plugins']))
-        t['plugin_guard'] = not self.data['disable_guard']
         t.commit()
 
 

File zine/templates/admin/plugins.html

View file
       </tr>
     {%- endfor %}
     </table>
-    <h2>{{ _("Plugin Guard") }}</h2>
-    <p>{% trans %}
-      Normally the plugin guard is enabled and catches exceptions during
-      plugin setup.  In some situations however this is not wanted, for
-      example if you want to debug a broken plugin.
-    {% endtrans %}
-    <dl>{{ form.disable_guard.as_dd() }}</dl>
     <h2>{{ _("Add New Plugin") }}</h2>
     <p>{% trans %}
       If you have a plugin as Zine <tt>.plugin</tt> file you can upload it