mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-24 01:49:15 -04:00
This commit replaces the old _API Documentation_ page with the Markdown version that Catherine has been working on. I’ve checked that there’s nothing obviously wrong or placeholder-y still in there, so I think we’re good to go.
53 lines
1.2 KiB
Python
53 lines
1.2 KiB
Python
import markdown
|
|
from flask import render_template, url_for, redirect, Markup
|
|
from app.main import main
|
|
from flask_login import login_required
|
|
|
|
from flask.ext.login import current_user
|
|
from mdx_gfm import GithubFlavoredMarkdownExtension
|
|
|
|
|
|
@main.route('/')
|
|
def index():
|
|
if current_user and current_user.is_authenticated():
|
|
return redirect(url_for('main.choose_service'))
|
|
return render_template('views/signedout.html')
|
|
|
|
|
|
@main.route("/verify-mobile")
|
|
@login_required
|
|
def verify_mobile():
|
|
return render_template('views/verify-mobile.html')
|
|
|
|
|
|
@main.route('/cookies')
|
|
def cookies():
|
|
return render_template('views/cookies.html')
|
|
|
|
|
|
@main.route('/trial-mode')
|
|
def trial_mode():
|
|
return render_template('views/trial-mode.html')
|
|
|
|
|
|
@main.route('/pricing')
|
|
def pricing():
|
|
return render_template('views/pricing.html')
|
|
|
|
|
|
@main.route('/terms')
|
|
def terms():
|
|
return render_template('views/terms-of-use.html')
|
|
|
|
|
|
@main.route('/documentation')
|
|
def documentation():
|
|
with open('docs/index.md') as source:
|
|
return render_template(
|
|
'views/documentation.html',
|
|
body=Markup(markdown.markdown(
|
|
source.read(),
|
|
extensions=[GithubFlavoredMarkdownExtension()]
|
|
))
|
|
)
|