Added command to update the permissions in the DB

This commit is contained in:
2011-06-03 00:50:23 +01:00
parent 2caf173e7b
commit ca46220efd

View File

@@ -0,0 +1,11 @@
from django.core.management.base import NoArgsCommand
from django.contrib.auth.management import create_permissions
from django.db.models import get_apps
class Command(NoArgsCommand):
help = "Updates the application permissions stored in the DB"
def handle_noargs(self, **options):
for app in get_apps():
create_permissions(app, None, 2)