created_models doesn't match post_syncdb's app
|Reported by:||Owned by:||Adrian Holovaty|
|Cc:||not.com@…||Triage Stage:||Design decision needed|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
When post_syncdb triggers a signal for one app, the "created_models" includes models created in other apps.
from django.dispatch import dispatcher from django.db.models import signals def show_it(sender, app, created_models, verbosity, interactive): print app, created_models dispatcher.connect(show_it,signal=signals.post_syncdb)
Put that in the init.py in one app of a multi-app project and try running "manage.py test"- notice that for every app, show_it is called with "created_models" that don't necessarily match "app".
Change History (4)
comment:1 Changed 10 years ago by
|Patch needs improvement:||unset|
|Triage Stage:||Unreviewed → Design decision needed|