Ejemplo n.º 1
0
 def changelist_view(self, request, extra_context=None):
     check_plugins()
     if RegisteredPlugin.objects.all().count() == len(settings.REQUIRED_PLUGINS):
         messages.warning(
             request,
             _('You have not registered all the plugins. Click <a href="%(url)s">here</a> in order to register them')
             % {"url": reverse("admin:register_plugins")},
         )
     return super(RegisteredPluginAdmin, self).changelist_view(request, extra_context)
Ejemplo n.º 2
0
 def changelist_view(self, request, extra_context=None):
     check_plugins()
     if RegisteredPlugin.objects.all().count() == len(
             settings.REQUIRED_PLUGINS):
         messages.warning(
             request,
             _('You have not registered all the plugins. Click <a href="%(url)s">here</a> in order to register them'
               ) % {'url': reverse('admin:register_plugins')})
     return super(RegisteredPluginAdmin,
                  self).changelist_view(request, extra_context)
Ejemplo n.º 3
0
 def register_new_plugins(self, request, extra_context=None):
     check_plugins(force_detect=True, force_broken_detect=True)
     send_info(request, _('Plugins detections done'))
     return HttpResponseRedirect('..')
Ejemplo n.º 4
0
 def register_new_plugins(self, request, extra_context=None):
     check_plugins(force_detect=True, force_broken_detect=True)
     send_info(request, _("Plugins detections done"))
     return HttpResponseRedirect("..")