Allow drafts to be viewed live (but not shown on index)
This commit is contained in:
@ -90,6 +90,9 @@ def render_blog_post(slug):
|
|||||||
"""
|
"""
|
||||||
# check if that file actually exists
|
# check if that file actually exists
|
||||||
path = safe_join(BLOG_DIR, slug + ".rst")
|
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):
|
if not os.path.exists(path):
|
||||||
abort(404)
|
abort(404)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user