|
@ -4,11 +4,12 @@ from django.contrib.auth.views import (login, logout, password_reset, |
|
|
password_reset_done, |
|
|
password_reset_done, |
|
|
password_reset_confirm, |
|
|
password_reset_confirm, |
|
|
password_reset_complete) |
|
|
password_reset_complete) |
|
|
#from atendimento.settings import EMAIL_SEND_USER |
|
|
|
|
|
from sigi.apps.usuarios.forms import (LoginForm, RecuperarSenhaEmailForm, |
|
|
from sigi.apps.usuarios.forms import (LoginForm, RecuperarSenhaEmailForm, |
|
|
RecuperacaoMudarSenhaForm) |
|
|
RecuperacaoMudarSenhaForm) |
|
|
from sigi.apps.usuarios.views import (HabilitarDetailView, HabilitarEditView, |
|
|
from sigi.apps.usuarios.views import (HabilitarDetailView, HabilitarEditView, |
|
|
MudarSenhaView, UsuarioCrud, ConfirmarEmailView) |
|
|
MudarSenhaView, UsuarioCrud, |
|
|
|
|
|
ConfirmarEmailView) |
|
|
|
|
|
from django.views.generic.base import TemplateView |
|
|
|
|
|
|
|
|
from .apps import AppConfig |
|
|
from .apps import AppConfig |
|
|
|
|
|
|
|
@ -17,7 +18,7 @@ app_name = AppConfig.name |
|
|
EMAIL_SEND_USER='atendimento@interlegis.leg.br' |
|
|
EMAIL_SEND_USER='atendimento@interlegis.leg.br' |
|
|
|
|
|
|
|
|
recuperar_email = [ |
|
|
recuperar_email = [ |
|
|
url(ur'^recuperar/recuperar_senha/$', |
|
|
url(ur'^home/atendimento/recuperar/recuperar_senha/$', |
|
|
password_reset, |
|
|
password_reset, |
|
|
{u'template_name': u'usuarios/recuperar_senha.html', |
|
|
{u'template_name': u'usuarios/recuperar_senha.html', |
|
|
u'password_reset_form': RecuperarSenhaEmailForm, |
|
|
u'password_reset_form': RecuperarSenhaEmailForm, |
|
@ -26,35 +27,36 @@ recuperar_email = [ |
|
|
u'from_email': EMAIL_SEND_USER, |
|
|
u'from_email': EMAIL_SEND_USER, |
|
|
u'html_email_template_name': u'usuarios/recuperar_senha_email.html'}, |
|
|
u'html_email_template_name': u'usuarios/recuperar_senha_email.html'}, |
|
|
name=u'recuperar_senha'), |
|
|
name=u'recuperar_senha'), |
|
|
url(ur'^recuperar/recuperar_recuperar/finalizado/$', |
|
|
url(ur'^home/atendimento/recuperar/recuperar_recuperar/finalizado/$', |
|
|
password_reset_done, |
|
|
password_reset_done, |
|
|
{u'template_name': u'usuarios/recuperar_senha_enviado.html'}, |
|
|
{u'template_name': u'usuarios/recuperar_senha_enviado.html'}, |
|
|
name=u'recuperar_senha_finalizado'), |
|
|
name=u'recuperar_senha_finalizado'), |
|
|
url(ur'^recuperar/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>.+)/$', |
|
|
url(ur'^home/atendimento/recuperar/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>.+)/$', |
|
|
password_reset_confirm, |
|
|
password_reset_confirm, |
|
|
{u'post_reset_redirect': u'usuarios:recuperar_senha_completo', |
|
|
{u'post_reset_redirect': u'usuarios:recuperar_senha_completo', |
|
|
u'template_name': u'usuarios/recuperacao_senha_form.html', |
|
|
u'template_name': u'usuarios/recuperacao_senha_form.html', |
|
|
u'set_password_form': RecuperacaoMudarSenhaForm}, |
|
|
u'set_password_form': RecuperacaoMudarSenhaForm}, |
|
|
name=u'recuperar_senha_confirma'), |
|
|
name=u'recuperar_senha_confirma'), |
|
|
url(ur'^recuperar/completo/$', |
|
|
url(ur'^home/atendimento/recuperar/completo/$', |
|
|
password_reset_complete, |
|
|
password_reset_complete, |
|
|
{u'template_name': u'usuarios/recuperacao_senha_completo.html'}, |
|
|
{u'template_name': u'usuarios/recuperacao_senha_completo.html'}, |
|
|
name=u'recuperar_senha_completo'), |
|
|
name=u'recuperar_senha_completo'), |
|
|
] |
|
|
] |
|
|
|
|
|
|
|
|
urlpatterns = recuperar_email + [ |
|
|
urlpatterns = recuperar_email + [ |
|
|
url(ur'^login/$', login, { |
|
|
url(ur'^home/atendimento/login/$', login, { |
|
|
u'template_name': u'usuarios/login.html', |
|
|
u'template_name': u'usuarios/login.html', |
|
|
u'authentication_form': LoginForm}, |
|
|
u'authentication_form': LoginForm}, |
|
|
name=u'login'), |
|
|
name=u'login'), |
|
|
url(ur'^logout/$', logout, {u'next_page': u'/login'}, name=u'logout'), |
|
|
url(ur'^home/atendimento/logout/$', logout, {u'next_page': u'/login'}, |
|
|
url(ur'^usuario/', include(UsuarioCrud.get_urls())), |
|
|
name=u'logout'), |
|
|
|
|
|
url(ur'^home/atendimento/usuario/', include(UsuarioCrud.get_urls())), |
|
|
|
|
|
|
|
|
url(ur'^habilitar/(?P<pk>\d+)$', |
|
|
url(ur'^home/atendimento/habilitar/(?P<pk>\d+)$', |
|
|
HabilitarDetailView.as_view(), name=u'habilitar_detail'), |
|
|
HabilitarDetailView.as_view(), name=u'habilitar_detail'), |
|
|
url(ur'^habilitar/(?P<pk>\d+)/edit$', |
|
|
url(ur'^home/atendimento/habilitar/(?P<pk>\d+)/edit$', |
|
|
HabilitarEditView.as_view(), name=u'habilitar_edit'), |
|
|
HabilitarEditView.as_view(), name=u'habilitar_edit'), |
|
|
url(ur'^usuario/(?P<pk>\d+)/mudar_senha$', |
|
|
url(ur'^home/atendimento/usuario/(?P<pk>\d+)/mudar_senha$', |
|
|
MudarSenhaView.as_view(), name=u'mudar_senha'), |
|
|
MudarSenhaView.as_view(), name=u'mudar_senha'), |
|
|
url(ur'^usuario/confirmar/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})$', |
|
|
url(ur'^usuario/confirmar/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})$', |
|
|
ConfirmarEmailView.as_view(), name=u'confirmar_email'), |
|
|
ConfirmarEmailView.as_view(), name=u'confirmar_email'), |
|
|