Ticket #6066: 6066-2.diff

File 6066-2.diff, 949 bytes (added by floguy, 17 years ago)

Updated patch to newest qs-rf revision 7260, and (potentially) fixed speed a bit. All tests pass.

  • django/core/management/sql.py

     
    482482    from django.db import models
    483483    from django.dispatch import dispatcher
    484484    # Emit the post_sync signal for every application.
    485     for app in models.get_apps():
     485    done = []
     486    todo = models.get_apps()
     487    while len(todo) > 0:
     488        app = todo.pop()
    486489        app_name = app.__name__.split('.')[-2]
    487490        if verbosity >= 2:
    488491            print "Running post-sync handlers for application", app_name
    489492        dispatcher.send(signal=models.signals.post_syncdb, sender=app,
    490493            app=app, created_models=created_models,
    491             verbosity=verbosity, interactive=interactive)
     494            verbosity=verbosity, interactive=interactive,
     495            done=done, todo=todo)
     496        done.insert(0, app)
Back to Top