Add help pages

This commit is contained in:
rubenwardy
2018-05-14 14:46:41 +01:00
parent 661bb19de7
commit 1e440d4523
7 changed files with 248 additions and 1 deletions

View File

@@ -1,4 +1,4 @@
from app import app
from app import app, pages
from flask import *
from flask_user import *
from flask_login import login_user, logout_user
@@ -31,3 +31,10 @@ def home_page():
return render_template("index.html", packages=packages)
from . import users, githublogin, packages, sass, tasks, admin, notifications
@menu.register_menu(app, ".help", "Help", order=19, endpoint_arguments_constructor=lambda: { 'path': 'help' })
@app.route('/<path:path>/')
def flatpage(path):
page = pages.get_or_404(path)
template = page.meta.get('template', 'flatpage.html')
return render_template(template, page=page)