mirror of
https://github.com/django/django.git
synced 2025-08-03 10:34:04 +00:00
Updated a few save() methods on models to accept force_insert and force_update
parameters. Required as a consequence of [8670] (so they can be used with create()). git-svn-id: http://code.djangoproject.com/svn/django/trunk@8673 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
a46d3ebfcc
commit
65c0846c45
5 changed files with 12 additions and 11 deletions
|
@ -14,9 +14,10 @@ class Person(models.Model):
|
|||
def __unicode__(self):
|
||||
return u"%s %s" % (self.first_name, self.last_name)
|
||||
|
||||
def save(self):
|
||||
def save(self, force_insert=False, force_update=False):
|
||||
print "Before save"
|
||||
super(Person, self).save() # Call the "real" save() method
|
||||
# Call the "real" save() method
|
||||
super(Person, self).save(force_insert, force_update)
|
||||
print "After save"
|
||||
|
||||
def delete(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue