summaryrefslogtreecommitdiff
path: root/lib/python2.7/site-packages/south/signals.py
diff options
context:
space:
mode:
authorttt2017-05-13 00:29:47 +0530
committerttt2017-05-13 00:29:47 +0530
commit4336f5f06f61de30ae3fa54650fce63a9d5ef5be (patch)
tree23b4ee9b8e8f24bf732acf2f7ad22ed50cdd5670 /lib/python2.7/site-packages/south/signals.py
downloadSBHS-2018-Rpi-4336f5f06f61de30ae3fa54650fce63a9d5ef5be.tar.gz
SBHS-2018-Rpi-4336f5f06f61de30ae3fa54650fce63a9d5ef5be.tar.bz2
SBHS-2018-Rpi-4336f5f06f61de30ae3fa54650fce63a9d5ef5be.zip
added all server files
Diffstat (limited to 'lib/python2.7/site-packages/south/signals.py')
-rw-r--r--lib/python2.7/site-packages/south/signals.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/python2.7/site-packages/south/signals.py b/lib/python2.7/site-packages/south/signals.py
new file mode 100644
index 0000000..12a1362
--- /dev/null
+++ b/lib/python2.7/site-packages/south/signals.py
@@ -0,0 +1,24 @@
+"""
+South-specific signals
+"""
+
+from django.dispatch import Signal
+from django.conf import settings
+
+# Sent at the start of the migration of an app
+pre_migrate = Signal(providing_args=["app", "verbosity", "interactive", "db"])
+
+# Sent after each successful migration of an app
+post_migrate = Signal(providing_args=["app", "verbosity", "interactive", "db"])
+
+# Sent after each run of a particular migration in a direction
+ran_migration = Signal(providing_args=["app", "migration", "method", "verbosity", "interactive", "db"])
+
+# Compatibility code for django.contrib.auth
+# Is causing strange errors, removing for now (we might need to fix up orm first)
+#if 'django.contrib.auth' in settings.INSTALLED_APPS:
+ #def create_permissions_compat(app, **kwargs):
+ #from django.db.models import get_app
+ #from django.contrib.auth.management import create_permissions
+ #create_permissions(get_app(app), (), 0)
+ #post_migrate.connect(create_permissions_compat)