diff -x .svn -x '*.pyc' -rup django_orig/django/core/management.py django_live/django/core/management.py
|
old
|
new
|
def _emit_post_sync_signal(created_model
|
| 499 | 499 | app=app, created_models=created_models, |
| 500 | 500 | verbosity=verbosity, interactive=interactive) |
| 501 | 501 | |
| | 502 | def _emit_post_reset_signal(app, interactive): |
| | 503 | from django.db import models |
| | 504 | from django.dispatch import dispatcher |
| | 505 | # Emit the post_reset signal for the given application. |
| | 506 | app_name = app.__name__.split('.')[-2] |
| | 507 | dispatcher.send(signal=models.signals.post_reset, sender=app, |
| | 508 | app=app, interactive=interactive) |
| | 509 | |
| 502 | 510 | def syncdb(verbosity=1, interactive=True): |
| 503 | 511 | "Creates the database tables for all apps in INSTALLED_APPS whose tables haven't already been created." |
| 504 | 512 | from django.db import backend, connection, transaction, models |
| … |
… |
def reset(app, interactive=True):
|
| 679 | 687 | |
| 680 | 688 | # First, try validating the models. |
| 681 | 689 | _check_for_validation_errors(app) |
| | 690 | |
| | 691 | # Import the 'management' module within each installed app, to register |
| | 692 | # dispatcher events. |
| | 693 | for app_name in settings.INSTALLED_APPS: |
| | 694 | try: |
| | 695 | __import__(app_name + '.management', {}, {}, ['']) |
| | 696 | except ImportError: |
| | 697 | pass |
| | 698 | |
| 682 | 699 | sql_list = get_sql_reset(app) |
| 683 | 700 | |
| 684 | 701 | if interactive: |
| … |
… |
The full error: """ % (app_name, app_nam
|
| 707 | 724 | transaction.rollback_unless_managed() |
| 708 | 725 | sys.exit(1) |
| 709 | 726 | transaction.commit_unless_managed() |
| | 727 | |
| | 728 | _emit_post_reset_signal(app, interactive) |
| 710 | 729 | else: |
| 711 | 730 | print "Reset cancelled." |
| 712 | 731 | reset.help_doc = "Executes ``sqlreset`` for the given app(s) in the current database." |
diff -x .svn -x '*.pyc' -rup django_orig/django/db/models/signals.py django_live/django/db/models/signals.py
|
old
|
new
|
pre_delete = object()
|
| 10 | 10 | post_delete = object() |
| 11 | 11 | |
| 12 | 12 | post_syncdb = object() |
| | 13 | post_reset = object() |