Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- apps = []
- from django.db.models import get_models, get_app
- for model in get_models(): apps.append(get_app(model._meta.app_label))
- from django.contrib.auth.management import create_permissions
- for app in apps:
- create_permissions(app, get_models(), 1)
Advertisement
Add Comment
Please, Sign In to add comment