Browse Source

At some point, I should write some tests

master
David Larlet 4 years ago
parent
commit
0921cb1c89
No known key found for this signature in database
1 changed files with 5 additions and 2 deletions
  1. 5
    2
      site.py

+ 5
- 2
site.py View File

@@ -25,7 +25,7 @@ DOMAIN = "https://larlet.fr"
LOCAL_DOMAIN = "http://larlet.test:3579"
# Hardcoding publication at 12 in Paris timezone.
NORMALIZED_STRFTIME = "%Y-%m-%dT12:00:00+01:00"
TODAY = date.today() - timedelta(hours=6)
TODAY = datetime.today() + timedelta(hours=6)


class CustomHTMLRenderer(mistune.HTMLRenderer):
@@ -117,7 +117,10 @@ class Page:

@property
def is_draft(self):
return self.date > TODAY
return (
datetime(year=self.date.year, month=self.date.month, day=self.date.day)
> TODAY
)


@cli

Loading…
Cancel
Save