Code

Ticket #6741: model-api.diff

File model-api.diff, 812 bytes (added by Arnaud Rebts, 6 years ago)

Correction of the documentation.

Line 
1Index: docs/model-api.txt
2===================================================================
3--- docs/model-api.txt  (revision 7207)
4+++ docs/model-api.txt  (working copy)
5@@ -2044,9 +2044,11 @@
6         name = models.CharField(max_length=100)
7         tagline = models.TextField()
8 
9-        def save(self):
10+        def save(self, raw=False, cls=None):
11+            """"Note: the extra-arguments are only necessary if you are overriding the save()
12+            method of a base class when using multi-table inheritance.""""
13             do_something()
14-            super(Blog, self).save() # Call the "real" save() method.
15+            super(Blog, self).save(raw, cls) # Call the "real" save() method (don't forget to pass the extra-arguments).
16             do_something_else()
17 
18 You can also prevent saving::