+ {% with messages = get_flashed_messages() %}
+ {% if messages %}
+ {% for message in messages %}
+
{{ message }}
+ {% endfor %}
+ {% endif %}
+ {% endwith %}
{% if show_google_openid %}
diff --git a/redash/controllers.py b/redash/controllers.py
index 6ba4737cb5..7c845445ef 100644
--- a/redash/controllers.py
+++ b/redash/controllers.py
@@ -12,7 +12,7 @@
import logging
from flask import render_template, send_from_directory, make_response, request, jsonify, redirect, \
- session, url_for, current_app
+ session, url_for, current_app, flash
from flask.ext.restful import Resource, abort
from flask_login import current_user, login_user, logout_user, login_required
import sqlparse
@@ -80,7 +80,7 @@ def login():
login_user(user, remember=remember)
return redirect(request.args.get('next') or '/')
except models.User.DoesNotExist:
- pass
+ flash("Wrong username or password.")
return render_template("login.html",
name=settings.NAME,