That's a handy function
This commit is contained in:
parent
1567881e5f
commit
d7dcd02ede
|
@ -21,7 +21,7 @@ class Contact(models.Model):
|
||||||
priority=models.IntegerField()
|
priority=models.IntegerField()
|
||||||
|
|
||||||
def save(self,*args,**kwargs):
|
def save(self,*args,**kwargs):
|
||||||
a=Updates.objects.get(page='contact')
|
a,_=Updates.objects.get_or_create(page='contact')
|
||||||
a.date=date.today()
|
a.date=date.today()
|
||||||
a.save()
|
a.save()
|
||||||
super().save(*args,**kwargs)
|
super().save(*args,**kwargs)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user