aboutsummaryrefslogtreecommitdiff
path: root/model.py
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2024-03-23 21:57:17 +0000
committerJuan J. Martinez <jjm@usebox.net>2024-03-23 21:57:17 +0000
commit5ccf2b593f5deebb219cc36f1a089c3238ba82fe (patch)
tree49e3555f72953432dc8dfe8b6555b894bca7ea5e /model.py
parente074abbcb7c193e0eb4ae990ad50ac371f01bce8 (diff)
downloadpersonal-wiki-pybottle-5ccf2b593f5deebb219cc36f1a089c3238ba82fe.tar.gz
personal-wiki-pybottle-5ccf2b593f5deebb219cc36f1a089c3238ba82fe.zip
Diffstat (limited to 'model.py')
-rw-r--r--model.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/model.py b/model.py
index b4147e1..b4e0b1c 100644
--- a/model.py
+++ b/model.py
@@ -17,6 +17,10 @@ def bootstrap_db(db):
class Page(object):
+ @classmethod
+ def now(cls):
+ return datetime.utcnow().isoformat(sep=" ", timespec="seconds")
+
def __init__(
self,
name="WikiHome",
@@ -26,7 +30,7 @@ class Page(object):
updated_at=None,
history=False,
):
- now = datetime.utcnow()
+ now = Page.now()
if updated_at is None:
updated_at = now