1)
class Blog(models.Model):
name = models.CharField(max_length=100)
tagline = models.TextField()
def save(self, *args, **kwargs):
do_something()
# Call the "real" save() method in the base class 'models.Model'
super(Blog, self).save(*args, **kwargs) <-----
do_something_else()
is equal to
2)
class Blog(models.Model):
name = models.CharField(max_length=100)
tagline = models.TextField()
def save(self, *args, **kwargs):
do_something()
# Call the "real" save() method in the base class 'models.Model'.
models.Model.save(self, *args, **kwargs) <----- Note: self
do_something_else()
This comment has been removed by the author.
ReplyDeletePositive site, where did u come up with the information on this posting?I have read a few of the articles on your website now, and I really like your style. Thanks a million and please keep up the effective work.
ReplyDeletemobile phone repair in Louisville
iphone repair in Louisville
cell phone repair in Louisville
phone repair in Louisville
ipad repair in Auburn Hills
tablet repair in Louisville
ipad repair in Louisville
mobile phone repair Louisville
iphone repair Louisville
cell phone repair Louisville
cheap hidden cameras
ismartalarm camera
dymo label maker
Waterproof Action Camera
Coleman full size air mattress
womens cotton long johns
APPLE WATCH SERIES 3 INFORMATION
Winter Cycling Jackets For Men
Thank you to share with us this Django override save method CODE in two ways. hire python developers in US
ReplyDeleteThis article is great
ReplyDeletepython course