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: