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