I have a myapp/management/__init__.py
that is registering a post_syncdb
handler like so:
from django.db.models import signals
from features import models as features
def create_features(app, created_models, verbosity, **kwargs):
print "Creating features!"
# Do stuff...
signals.post_syncdb.connect(create_features, sender=features)
I've verified the following:
- Both
features
andmyapp
are insettings.INSTALLED_APPS
myapp.management
is getting loaded prior to the syncdb running (verified via a print statement at the module level)- The
features
app is getting processed bysyncdb
, and it is emitting apost_syncdb
signal (verified by examiningsyncdb
's output with--verbosity=2
. - I'm using the exact same idiom for another pair of apps, and that handler is called correctly. I've compared the two modules and found no relevant differences between the invocations.
However, myapp.management.create_features
is never called. What am I missing?