From 63745d2865d28f4d5ceed7ebd7b4cf614fdaa17f Mon Sep 17 00:00:00 2001 From: Tim Van Baak Date: Fri, 24 Apr 2020 13:46:30 -0700 Subject: [PATCH] Move auth templates into new server submodule --- amanuensis/server/{auth.py => auth/__init__.py} | 6 ++++-- .../auth/login.html => server/auth/auth.login.jinja} | 0 2 files changed, 4 insertions(+), 2 deletions(-) rename amanuensis/server/{auth.py => auth/__init__.py} (91%) rename amanuensis/{templates/auth/login.html => server/auth/auth.login.jinja} (100%) diff --git a/amanuensis/server/auth.py b/amanuensis/server/auth/__init__.py similarity index 91% rename from amanuensis/server/auth.py rename to amanuensis/server/auth/__init__.py index 6c01e3d..e707eb0 100644 --- a/amanuensis/server/auth.py +++ b/amanuensis/server/auth/__init__.py @@ -36,7 +36,9 @@ def get_login_manager(root: RootConfigDirectoryContext) -> LoginManager: return login_manager -bp_auth = Blueprint('auth', __name__, url_prefix='/auth') +bp_auth = Blueprint('auth', __name__, + url_prefix='/auth', + template_folder='.') @bp_auth.route('/login/', methods=['GET', 'POST']) @@ -55,7 +57,7 @@ def login(): .format(user.cfg)) return redirect(url_for('home.home')) flash("Login not recognized") - return render_template('auth/login.html', form=form) + return render_template('auth.login.jinja', form=form) @bp_auth.route("/logout/", methods=['GET']) diff --git a/amanuensis/templates/auth/login.html b/amanuensis/server/auth/auth.login.jinja similarity index 100% rename from amanuensis/templates/auth/login.html rename to amanuensis/server/auth/auth.login.jinja