Commit 5270af0b authored by Jelle van der Waa's avatar Jelle van der Waa 🚧
Browse files

Remove update_types_permissions management command

Remove the management command which reloads permissions for specified
apps or all apps if no args are specified. This management command looks
broken since create_permissions has verbosity as it's second parameter
and not a list of models.
parent 42f34783
from import BaseCommand
from django.db.models import get_models, get_app
from import create_permissions
from import update_contenttypes
class Command(BaseCommand):
args = '<app app ...>'
help = 'reloads permissions for specified apps, or all apps if no args are specified'
def handle(self, *args, **options):
if not args:
apps = []
for model in get_models():
apps = []
for arg in args:
for app in apps:
update_contenttypes(app, None, options.get('verbosity', 2), interactive=True)
create_permissions(app, get_models(), options.get('verbosity', 0))
# vim: set ts=4 sw=4 et:
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment