Ticket #6066: 6066.diff

File 6066.diff, 938 bytes (added by floguy, 7 years ago)

Added done and todo as kwargs to the post_syncdb signal

  • django/core/management/sql.py

     
    477477    from django.db import models
    478478    from django.dispatch import dispatcher
    479479    # Emit the post_sync signal for every application.
    480     for app in models.get_apps():
     480    done = set()
     481    apps = set(models.get_apps())
     482    for app in apps:
    481483        app_name = app.__name__.split('.')[-2]
    482484        if verbosity >= 2:
    483485            print "Running post-sync handlers for application", app_name
    484486        dispatcher.send(signal=models.signals.post_syncdb, sender=app,
    485487            app=app, created_models=created_models,
    486             verbosity=verbosity, interactive=interactive)
     488            verbosity=verbosity, interactive=interactive,
     489            done=done, todo=apps.difference(done))
     490        done.add(app)
Back to Top