diff options
author | Juan J. Martinez <jjm@usebox.net> | 2024-03-23 21:57:17 +0000 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2024-03-23 21:57:17 +0000 |
commit | 5ccf2b593f5deebb219cc36f1a089c3238ba82fe (patch) | |
tree | 49e3555f72953432dc8dfe8b6555b894bca7ea5e /model.py | |
parent | e074abbcb7c193e0eb4ae990ad50ac371f01bce8 (diff) | |
download | personal-wiki-pybottle-5ccf2b593f5deebb219cc36f1a089c3238ba82fe.tar.gz personal-wiki-pybottle-5ccf2b593f5deebb219cc36f1a089c3238ba82fe.zip |
Diffstat (limited to 'model.py')
-rw-r--r-- | model.py | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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 |