summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/views/__init__.py4
-rw-r--r--app/views/user.py (renamed from app/views/login.py)4
-rw-r--r--templates/menu.jinja2
-rw-r--r--templates/user/login.jinja (renamed from templates/login/login.jinja)0
4 files changed, 5 insertions, 5 deletions
diff --git a/app/views/__init__.py b/app/views/__init__.py
index 8737d07..7d344ad 100644
--- a/app/views/__init__.py
+++ b/app/views/__init__.py
@@ -51,10 +51,10 @@ def page_not_found (error):
return render_template('404.jinja', page = request.path), 404
# Now import the views
-from . import categories, consts, expenses, login, api
+from . import categories, consts, expenses, user, api
-app.register_blueprint(login.mod)
app.register_blueprint(expenses.mod)
+app.register_blueprint(user.mod, url_prefix='/user')
app.register_blueprint(consts.mod, url_prefix='/const')
app.register_blueprint(categories.mod, url_prefix='/cat')
diff --git a/app/views/login.py b/app/views/user.py
index 7b46665..e3c9251 100644
--- a/app/views/login.py
+++ b/app/views/user.py
@@ -8,7 +8,7 @@ from ..login import login_user, logout_user, login_manager
# we explicitly need flask's redirect and not our variant
from flask import redirect
-mod = Blueprint('login', __name__)
+mod = Blueprint('user', __name__)
@mod.route('/login', methods=('GET', 'POST'))
@templated
@@ -26,4 +26,4 @@ def logout():
logout_user()
return redirect(url_for('.login'))
-login_manager.login_view = 'login.login'
+login_manager.login_view = 'user.login'
diff --git a/templates/menu.jinja b/templates/menu.jinja
index aa2bdd4..cebe1e5 100644
--- a/templates/menu.jinja
+++ b/templates/menu.jinja
@@ -6,5 +6,5 @@
]
%}
{% if current_user.is_authenticated() %}
- {% set menu = menu + [("login.logout", "Logout")] %}
+ {% set menu = menu + [("user.logout", "Logout")] %}
{% endif %}
diff --git a/templates/login/login.jinja b/templates/user/login.jinja
index 0b2813c..0b2813c 100644
--- a/templates/login/login.jinja
+++ b/templates/user/login.jinja