Browse Source

arrumando erros de redirect

diagnosticos
Felipe Vieira 13 years ago
parent
commit
1083ea856e
  1. 2
      sigi/apps/diagnosticos/urls.py
  2. 1
      sigi/apps/diagnosticos/views.py
  3. 2
      sigi/templates/diagnosticos/diagnosticos_login.html

2
sigi/apps/diagnosticos/urls.py

@ -13,7 +13,7 @@ urlpatterns = patterns('',
# Logout do Diagnóstico
url(r'^logout/$', 'django.contrib.auth.views.logout',
{'next_page': LOGOUT_REDIRECT_URL}, name='logout'),
{'next_page': LOGIN_REDIRECT_URL}, name='logout'),
# Lista de Categorias
url(r'^(?P<id_diagnostico>\d+)/categorias/$', 'sigi.apps.diagnosticos.views.categorias', name='lista_categorias'),

1
sigi/apps/diagnosticos/views.py

@ -6,6 +6,7 @@ from django.shortcuts import render_to_response
from django.template import RequestContext
from django.views.decorators.cache import cache_page
from sigi.apps.diagnosticos.urls import LOGIN_REDIRECT_URL
from sigi.apps.utils.decorators import login_required
from sigi.apps.diagnosticos.decorators import validate_diagnostico
from sigi.apps.diagnosticos.models import Diagnostico, Categoria

2
sigi/templates/diagnosticos/diagnosticos_login.html

@ -43,7 +43,7 @@
<label for="password">Senha de Acesso:</label>
<input type="password" name="password" id="id_password" placeholder="Senha de Acesso">
</div>
<input type="hidden" name="next" value="{% url lista %}" />
<input type="hidden" name="next" value="{% url lista_diagnosticos %}" />
<button type="submit">Entrar</button>
</form>
</div>

Loading…
Cancel
Save