diff --git a/i2p2www/blog/helpers.py b/i2p2www/blog/helpers.py index f5989720e4d9e02202686dc1055d57e6d2e1e532..065d389e722a48a0bf194cc4b078be62dc085ded 100644 --- a/i2p2www/blog/helpers.py +++ b/i2p2www/blog/helpers.py @@ -91,7 +91,10 @@ def render_blog_post(slug): # check if that file actually exists path = safe_join(BLOG_DIR, slug + ".rst") if not os.path.exists(path): - abort(404) + # check for drafts + path = safe_join(BLOG_DIR, slug + ".rst.draft") + if not os.path.exists(path): + abort(404) # read file with codecs.open(path, encoding='utf-8') as fd: