pub_date tz aware
This commit is contained in:
parent
87df063bb4
commit
c7beb43311
|
@ -104,7 +104,7 @@ class Page(models.Model):
|
|||
if count:
|
||||
self.slug += '-' + count
|
||||
if self.is_published and self.pub_date is None:
|
||||
self.pub_date = tz.datetime.now()
|
||||
self.pub_date = tz.now()
|
||||
elif not self.is_published:
|
||||
self.pub_date = None
|
||||
super().save(*args, **kwargs)
|
||||
|
|
Loading…
Reference in New Issue
Block a user