I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 7c018e34 authored by str4d's avatar str4d
Browse files

Allow drafts to be viewed live (but not shown on index)

parent 58343a85
No related branches found
No related tags found
No related merge requests found
......@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment