From b9a1a62a815589b448169dbc0c6390d0be26a23f Mon Sep 17 00:00:00 2001 From: Feliciaan De Palmenaer Date: Sun, 29 Mar 2015 11:46:08 +0200 Subject: [PATCH] Fix some bugs (closes #8) --- app/templates/order.html | 2 +- app/templates/utils.html | 2 +- app/zeus.py | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/templates/order.html b/app/templates/order.html index e005da4..2d833d6 100644 --- a/app/templates/order.html +++ b/app/templates/order.html @@ -28,7 +28,7 @@
-

Orders

+

Items

{% for item in order.items %} {{ item.get_name() }} - {{ item.product.name }} - {{ item.product.price|euro }} {% if item.can_delete(order.id, current_user.id, session.get('anon_name', '')) -%}{%- endif %}
diff --git a/app/templates/utils.html b/app/templates/utils.html index 98ce6a4..6d70c07 100644 --- a/app/templates/utils.html +++ b/app/templates/utils.html @@ -6,7 +6,7 @@ Orders: {{ order.items.count() }}

- Open + Expand
{%- endmacro %} \ No newline at end of file diff --git a/app/zeus.py b/app/zeus.py index 5fecf91..fda87b3 100644 --- a/app/zeus.py +++ b/app/zeus.py @@ -23,8 +23,7 @@ zeus = oauth.remote_app( def zeus_login(): - if app.debug: - return zeus.authorize(callback=url_for('authorized', _external=True)) + return zeus.authorize(callback=url_for('authorized', _external=True)) @app.route('/login/zeus/authorized') @@ -50,7 +49,7 @@ def authorized(): return login_and_redirect_user(user) flash("You're not allowed to enter, please contact a system administrator") - return redirect(url_for("admin.index")) + return redirect(url_for("home")) @zeus.tokengetter