From f5b69467d197e1139e4fdb06b82de54f993b3f33 Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Wed, 2 Nov 2016 12:12:32 +0200 Subject: Cleanup --- __init__.py | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 __init__.py diff --git a/__init__.py b/__init__.py deleted file mode 100644 index 74b4ba7..0000000 --- a/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -# register a signal do update permissions every migration. -# This is based on app django_extensions update_permissions command -from south.signals import post_migrate - -def update_permissions_after_migration(app, **kwargs): - """ - Update app permission just after every migration. - This is based on app django_extensions update_permissions management command. - """ - from django.conf import settings - from django.db.models import get_app, get_models - from django.contrib.auth.management import create_permissions - - create_permissions(get_app(app), get_models(), 2 if settings.DEBUG else 0) - -post_migrate.connect(update_permissions_after_migration) -- cgit v1.2.3