mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-17 04:59:37 -04:00
Add a route to serve guidance pages
Rather than hard coding the page titles, let’s just accept anythin that’s a real template in the guidance folder – will make it easier for Karl to edit and create pages.
This commit is contained in:
@@ -7,6 +7,7 @@ from flask import (
|
||||
url_for,
|
||||
)
|
||||
from flask_login import current_user
|
||||
from jinja2.exceptions import TemplateNotFound
|
||||
from notifications_utils.international_billing_rates import (
|
||||
INTERNATIONAL_BILLING_RATES,
|
||||
)
|
||||
@@ -325,6 +326,17 @@ def trial_mode_new():
|
||||
)
|
||||
|
||||
|
||||
@main.route('/guidance')
|
||||
@main.route('/guidance/<slug>')
|
||||
def guidance(slug='index'):
|
||||
try:
|
||||
return render_template(
|
||||
'views/guidance/{}.html'.format(slug)
|
||||
)
|
||||
except TemplateNotFound:
|
||||
abort(404)
|
||||
|
||||
|
||||
# --- Redirects --- #
|
||||
|
||||
@main.route('/roadmap', endpoint='old_roadmap')
|
||||
|
||||
Reference in New Issue
Block a user