diff --git a/django/core/management/commands/loaddata.py b/django/core/management/commands/loaddata.py
index 34f3543..6f523c5 100644
a
|
b
|
from optparse import make_option
|
6 | 6 | |
7 | 7 | from django.conf import settings |
8 | 8 | from django.core import serializers |
| 9 | from django.core.serializers.signals import pre_insert |
9 | 10 | from django.core.management.base import BaseCommand |
10 | 11 | from django.core.management.color import no_style |
11 | 12 | from django.db import connections, router, transaction, DEFAULT_DB_ALIAS |
… |
… |
class Command(BaseCommand):
|
171 | 172 | if router.allow_syncdb(using, obj.object.__class__): |
172 | 173 | loaded_objects_in_fixture += 1 |
173 | 174 | models.add(obj.object.__class__) |
| 175 | pre_insert.send(self, instance=obj.object) |
174 | 176 | obj.save(using=using) |
175 | 177 | loaded_object_count += loaded_objects_in_fixture |
176 | 178 | fixture_object_count += objects_in_fixture |
diff --git a/django/core/serializers/signals.py b/django/core/serializers/signals.py
new file mode 100644
index 0000000..49e7143
-
|
+
|
|
| 1 | from django.dispatch import Signal |
| 2 | |
| 3 | pre_insert = Signal(providing_args=['object']) |