Commits

Artem Egorkine  committed 75b745b

Reverted commit a2da213e5370 reenabling the plugin guard and exposing it on the plugin page.

  • Participants
  • Parent commits f13c2ee

Comments (0)

Files changed (3)

File zine/config.py

         u'it.')),
 
     # plugin settings
-    'plugin_guard':             BooleanField(default=not _dev_mode),
+    'plugin_guard':             BooleanField(default=True),
     'plugins':                  CommaSeparated(TextField(), default=list),
     'plugin_searchpath':        CommaSeparated(TextField(), default=list,
         help_text=l_(u'It\'s possible to put one or more comma '

File zine/forms.py

         if initial is None:
             initial = dict(
                 active_plugins=[x.name for x in app.plugins.itervalues()
-                                if x.active]
+                                if x.active],
+                disable_guard=not app.cfg['plugin_guard']
             )
         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

       <span class="bundlemarker">*</span> marked plugins are bundled with Zine
       and upgraded as part of it.
     {% endtrans %}</p>
+    <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