root / env / lib / python2.7 / site-packages / south / signals.py @ d1a4905f
History | View | Annotate | Download (873 Bytes)
1 |
"""
|
---|---|
2 |
South-specific signals
|
3 |
"""
|
4 |
|
5 |
from django.dispatch import Signal |
6 |
from django.conf import settings |
7 |
|
8 |
# Sent at the start of the migration of an app
|
9 |
pre_migrate = Signal(providing_args=["app"])
|
10 |
|
11 |
# Sent after each successful migration of an app
|
12 |
post_migrate = Signal(providing_args=["app"])
|
13 |
|
14 |
# Sent after each run of a particular migration in a direction
|
15 |
ran_migration = Signal(providing_args=["app","migration","method"]) |
16 |
|
17 |
# Compatibility code for django.contrib.auth
|
18 |
# Is causing strange errors, removing for now (we might need to fix up orm first)
|
19 |
#if 'django.contrib.auth' in settings.INSTALLED_APPS:
|
20 |
#def create_permissions_compat(app, **kwargs):
|
21 |
#from django.db.models import get_app
|
22 |
#from django.contrib.auth.management import create_permissions
|
23 |
#create_permissions(get_app(app), (), 0)
|
24 |
#post_migrate.connect(create_permissions_compat)
|