mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-06 15:08:25 -04:00
Merge pull request #469 from alphagov/fix_doc_link
Doc file is loaded using current directory of the flask view.
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import markdown
|
import markdown
|
||||||
|
import os
|
||||||
from flask import render_template, url_for, redirect, Markup
|
from flask import render_template, url_for, redirect, Markup
|
||||||
from app.main import main
|
from app.main import main
|
||||||
from flask_login import login_required
|
from flask_login import login_required
|
||||||
@@ -42,7 +43,8 @@ def terms():
|
|||||||
|
|
||||||
@main.route('/documentation')
|
@main.route('/documentation')
|
||||||
def documentation():
|
def documentation():
|
||||||
with open('docs/index.md') as source:
|
curr_dir = os.path.dirname(os.path.realpath(__file__))
|
||||||
|
with open(os.path.join(curr_dir, '../../../docs/index.md')) as source:
|
||||||
return render_template(
|
return render_template(
|
||||||
'views/documentation.html',
|
'views/documentation.html',
|
||||||
body=Markup(markdown.markdown(
|
body=Markup(markdown.markdown(
|
||||||
|
|||||||
Reference in New Issue
Block a user