Ticket #8759: 8759.typo.diff
File 8759.typo.diff, 1.1 KB (added by , 16 years ago) |
---|
-
django/django/docs/topics/db/models.txt
692 692 693 693 def save(self, force_insert=False, force_update=False): 694 694 do_something() 695 super(Blog, self).save(force_inse t, force_update) # Call the "real" save() method.695 super(Blog, self).save(force_insert, force_update) # Call the "real" save() method. 696 696 do_something_else() 697 697 698 698 You can also prevent saving:: … … 705 705 if self.name == "Yoko Ono's blog": 706 706 return # Yoko shall never have her own blog! 707 707 else: 708 super(Blog, self).save(force_inse t, force_update) # Call the "real" save() method.708 super(Blog, self).save(force_insert, force_update) # Call the "real" save() method. 709 709 710 710 It's important to remember to call the superclass method -- that's that 711 711 ``super(Blog, self).save()`` business -- to ensure that the object still gets