mirror of
https://github.com/django/django.git
synced 2025-07-04 09:49:12 +00:00
[full-history]
* Fixed 'signal_name' error # Somehow this modification got run over by trunk merge. # I'm trying to find a better solution, but for now this will do. # Thanks to David Cramer for error report. git-svn-id: http://code.djangoproject.com/svn/django/branches/full-history@3766 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
dbdbf1735e
commit
a2ea7775a3
@ -160,7 +160,7 @@ class Model(object):
|
|||||||
_prepare = classmethod(_prepare)
|
_prepare = classmethod(_prepare)
|
||||||
|
|
||||||
def save(self):
|
def save(self):
|
||||||
dispatcher.send(signal=signals.pre_save, sender=self.__class__, instance=self)
|
dispatcher.send(signal=signals.pre_save, sender=self.__class__, instance=self, signal_name="pre_save")
|
||||||
|
|
||||||
non_pks = [f for f in self._meta.fields if not f.primary_key]
|
non_pks = [f for f in self._meta.fields if not f.primary_key]
|
||||||
cursor = connection.cursor()
|
cursor = connection.cursor()
|
||||||
|
@ -921,7 +921,7 @@ def delete_objects(seen_objs):
|
|||||||
|
|
||||||
# Pre notify all instances to be deleted
|
# Pre notify all instances to be deleted
|
||||||
for pk_val, instance in seen_objs[cls]:
|
for pk_val, instance in seen_objs[cls]:
|
||||||
dispatcher.send(signal=signals.pre_delete, sender=cls, instance=instance)
|
dispatcher.send(signal=signals.pre_delete, sender=cls, instance=instance, signal_name="pre_delete")
|
||||||
|
|
||||||
pk_list = [pk for pk,instance in seen_objs[cls]]
|
pk_list = [pk for pk,instance in seen_objs[cls]]
|
||||||
for related in cls._meta.get_all_related_many_to_many_objects():
|
for related in cls._meta.get_all_related_many_to_many_objects():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user