-# -*- conding: utf-8 -*-
-__author__="lreqc"
-__date__ ="$2009-09-08 14:31:26$"
+# -*- coding: utf-8 -*-
+#
+# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later.
+# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
+#
+
from django.core.management.base import NoArgsCommand
from toolbar.models import Button, ButtonGroup
from django.core.management.base import NoArgsCommand
from toolbar.models import Button, ButtonGroup
def handle_noargs(self, **options):
buttons = Button.objects.all()
print "Validating parameters... "
for b in buttons:
def handle_noargs(self, **options):
buttons = Button.objects.all()
print "Validating parameters... "
for b in buttons:
print "Searching for empty groups and orphaned buttons:"
for g in ButtonGroup.objects.all():
if len(g.button_set.all()) == 0:
print "Searching for empty groups and orphaned buttons:"
for g in ButtonGroup.objects.all():
if len(g.button_set.all()) == 0: