From 45379a8eb078c62449df299a7c0d88f590c92ce8 Mon Sep 17 00:00:00 2001 From: Eduardo Calil Date: Tue, 19 Apr 2016 11:43:15 -0300 Subject: [PATCH] Melhora a mensagem de erro no Login --- base/views.py | 1 - sapl/settings.py | 1 + templates/base/login.html | 10 +++++----- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/base/views.py b/base/views.py index 9ee21b2c4..2e801a3c5 100644 --- a/base/views.py +++ b/base/views.py @@ -65,4 +65,3 @@ class CasaLegislativaTableAuxView(FormView): def get_success_url(self): return reverse('base:casa_legislativa') - diff --git a/sapl/settings.py b/sapl/settings.py index b3361ae9c..1673ebf84 100644 --- a/sapl/settings.py +++ b/sapl/settings.py @@ -31,6 +31,7 @@ DEBUG = config('DEBUG', default=False, cast=bool) ALLOWED_HOSTS = ['*'] LOGIN_REDIRECT_URL = '/' +LOGIN_URL = '/login/?next=' # SAPL business apps in dependency order SAPL_APPS = ( diff --git a/templates/base/login.html b/templates/base/login.html index f167217aa..e091ef5a3 100644 --- a/templates/base/login.html +++ b/templates/base/login.html @@ -2,11 +2,6 @@ {% load i18n %} {% block base_content %} - {% if form.errors %} - -

Usuário e/ou Senha inexistente. Tente novamente.

- {% endif %} - {% if next %} {% if user.is_authenticated %}

Você não tem acesso a esta página. Se quiser continuar, faça o Login.

@@ -30,6 +25,11 @@

+ {% if form.errors %} +
Usuário e/ou Senha inexistente. +
+ + {% endif %}
Usuário {{ form.username }}