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

This commit is contained in:
str4d
2014-02-08 22:20:21 +00:00
parent 58343a85ae
commit 7c018e3418

View File

@ -90,6 +90,9 @@ def render_blog_post(slug):
"""
# check if that file actually exists
path = safe_join(BLOG_DIR, slug + ".rst")
if not os.path.exists(path):
# check for drafts
path = safe_join(BLOG_DIR, slug + ".rst.draft")
if not os.path.exists(path):
abort(404)