Beispiel #1
0
def build(request, id):
    if not is_admin(request.user):
        raise Http403
    
    plugin = get_object_or_404(Plugin, id=id)

    build_plugin(plugin)
    messages.add_message(request, messages.SUCCESS, 'Successfully built %s' % plugin)
    
    return redirect("admin:plugin_builder_plugin_change",plugin.pk)
Beispiel #2
0
 def build_plugins(self, request, queryset):
     message_bit = ""
     for plugin in queryset:
         build_plugin(plugin)
         message_bit = message_bit + ", %s" % plugin.plural_lower
     self.message_user(request, "Successfully built the following plugins:%s" % message_bit[1:])