Fix 404 internal server error

This commit is contained in:
thematdev 2021-09-22 14:33:53 +03:00
parent 636ac88daf
commit ecc42067ec

View File

@ -40,7 +40,8 @@ def render_page(page):
def get_pandoc_page(page):
path = f'{PANDOC_PATH}/{page}'
if not os.path.exists(f'{path}'):
abort(404)
# TODO: Add 404 handler
return 'This page does not exist'
with open(f'{path}/config.json') as f:
data = json.loads(f.read())
if not os.path.exists(f'{path}/render.html') or not os.path.exists(f'{path}/render.html.lock'):