Browse Source

concerta urls do app usuarios

Signed-off-by: Luciano Almeida <lucianoalmeida@interlegis.leg.br>
pull/6/head
Luciano Almeida 9 years ago
committed by Luciano Almeida
parent
commit
605582ca18
  1. 20
      sigi/apps/contatos/migrations/0003_auto_20160623_0829.py
  2. 20
      sigi/apps/home/urls.py
  3. 20
      sigi/apps/inventario/migrations/0002_auto_20160623_0829.py
  4. 20
      sigi/apps/parlamentares/migrations/0002_auto_20160623_0829.py
  5. 20
      sigi/apps/servicos/migrations/0004_auto_20160623_0829.py
  6. 20
      sigi/apps/servidores/migrations/0002_auto_20160623_0829.py
  7. 20
      sigi/apps/solicitacoes/migrations/0003_auto_20160623_0829.py
  8. 5
      sigi/apps/solicitacoes/urls.py
  9. 25
      sigi/apps/usuarios/migrations/0004_auto_20160623_0829.py
  10. 28
      sigi/apps/usuarios/urls.py
  11. 4
      sigi/apps/usuarios/views.py
  12. 16
      sigi/settings/base.py

20
sigi/apps/contatos/migrations/0003_auto_20160623_0829.py

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-06-23 08:29
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('contatos', '0002_auto_20151104_0810'),
]
operations = [
migrations.AlterField(
model_name='contato',
name='email',
field=models.EmailField(blank=True, max_length=254, verbose_name='e-mail'),
),
]

20
sigi/apps/home/urls.py

@ -1,15 +1,23 @@
# coding: utf-8
from django.conf.urls import patterns, url
from django.views.generic.base import TemplateView
urlpatterns = patterns('sigi.apps.home.views',
urlpatterns = patterns(
'sigi.apps.home.views',
url(r'^home/atendimento', TemplateView.as_view(
template_name='index_atendimento.html'),
name='index_atendimento'),
url(r'^$', 'index', name='sigi_index'),
url(r'^home/resumoconvenios/$', 'resumo_convenios', name="home_resumoconvenios"),
url(r'^home/resumoconvenios/$', 'resumo_convenios',
name="home_resumoconvenios"),
url(r'^home/resumoseit/$', 'resumo_seit', name="home_resumoseit"),
url(r'^home/chartseit/$', 'chart_seit', name="home_chartseit"),
url(r'^home/chartconvenios/$', 'chart_convenios', name="home_chartconvenios"),
url(r'^home/chartconvenios/$', 'chart_convenios',
name="home_chartconvenios"),
url(r'^home/chartcarteira/$', 'chart_carteira', name="home_chartcarteira"),
url(r'^home/chartperformance/$', 'chart_performance', name="home_chartperformance"),
url(r'^home/report/semconvenio/$', 'report_sem_convenio', name="home_reportsemconvenio"),
url(r'^home/chartperformance/$', 'chart_performance',
name="home_chartperformance"),
url(r'^home/report/semconvenio/$', 'report_sem_convenio',
name="home_reportsemconvenio"),
)

20
sigi/apps/inventario/migrations/0002_auto_20160623_0829.py

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-06-23 08:29
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('inventario', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='fornecedor',
name='email',
field=models.EmailField(blank=True, max_length=254, verbose_name='e-mail'),
),
]

20
sigi/apps/parlamentares/migrations/0002_auto_20160623_0829.py

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-06-23 08:29
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('parlamentares', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='parlamentar',
name='email',
field=models.EmailField(blank=True, max_length=254, verbose_name='e-mail'),
),
]

20
sigi/apps/servicos/migrations/0004_auto_20160623_0829.py

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-06-23 08:29
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('servicos', '0003_auto_20160616_1602'),
]
operations = [
migrations.AlterField(
model_name='casamanifesta',
name='email',
field=models.EmailField(blank=True, max_length=254, verbose_name='E-mail de contato'),
),
]

20
sigi/apps/servidores/migrations/0002_auto_20160623_0829.py

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-06-23 08:29
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('servidores', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='servidor',
name='email_pessoal',
field=models.EmailField(blank=True, max_length=254, null=True, verbose_name=b'email pessoal'),
),
]

20
sigi/apps/solicitacoes/migrations/0003_auto_20160623_0829.py

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-06-23 08:29
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('solicitacoes', '0002_auto_20160616_1602'),
]
operations = [
migrations.AlterField(
model_name='solicitacao',
name='email_contato',
field=models.EmailField(blank=True, max_length=254, null=True, verbose_name='Email de contato'),
),
]

5
sigi/apps/solicitacoes/urls.py

@ -8,6 +8,7 @@ from .apps import AppConfig
app_name = AppConfig.name
urlpatterns = [
url(ur'sistema/', include(SistemaCrud.get_urls())),
url(ur'solicitacao/', include(SolicitacaoCrud.get_urls())),
url(ur'home/atendimento/sistema/', include(SistemaCrud.get_urls())),
url(ur'home/atendimento/solicitacao/',
include(SolicitacaoCrud.get_urls())),
]

25
sigi/apps/usuarios/migrations/0004_auto_20160623_0829.py

@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-06-23 08:29
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('usuarios', '0003_auto_20160616_1602'),
]
operations = [
migrations.AlterField(
model_name='confirmaemail',
name='email',
field=models.EmailField(max_length=254, unique=True, verbose_name='Email'),
),
migrations.AlterField(
model_name='usuario',
name='email',
field=models.EmailField(max_length=254, unique=True, verbose_name='Email'),
),
]

28
sigi/apps/usuarios/urls.py

@ -4,11 +4,12 @@ from django.contrib.auth.views import (login, logout, password_reset,
password_reset_done,
password_reset_confirm,
password_reset_complete)
#from atendimento.settings import EMAIL_SEND_USER
from sigi.apps.usuarios.forms import (LoginForm, RecuperarSenhaEmailForm,
RecuperacaoMudarSenhaForm)
RecuperacaoMudarSenhaForm)
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
@ -17,7 +18,7 @@ app_name = AppConfig.name
EMAIL_SEND_USER='atendimento@interlegis.leg.br'
recuperar_email = [
url(ur'^recuperar/recuperar_senha/$',
url(ur'^home/atendimento/recuperar/recuperar_senha/$',
password_reset,
{u'template_name': u'usuarios/recuperar_senha.html',
u'password_reset_form': RecuperarSenhaEmailForm,
@ -26,35 +27,36 @@ recuperar_email = [
u'from_email': EMAIL_SEND_USER,
u'html_email_template_name': u'usuarios/recuperar_senha_email.html'},
name=u'recuperar_senha'),
url(ur'^recuperar/recuperar_recuperar/finalizado/$',
url(ur'^home/atendimento/recuperar/recuperar_recuperar/finalizado/$',
password_reset_done,
{u'template_name': u'usuarios/recuperar_senha_enviado.html'},
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,
{u'post_reset_redirect': u'usuarios:recuperar_senha_completo',
u'template_name': u'usuarios/recuperacao_senha_form.html',
u'set_password_form': RecuperacaoMudarSenhaForm},
name=u'recuperar_senha_confirma'),
url(ur'^recuperar/completo/$',
url(ur'^home/atendimento/recuperar/completo/$',
password_reset_complete,
{u'template_name': u'usuarios/recuperacao_senha_completo.html'},
name=u'recuperar_senha_completo'),
]
urlpatterns = recuperar_email + [
url(ur'^login/$', login, {
url(ur'^home/atendimento/login/$', login, {
u'template_name': u'usuarios/login.html',
u'authentication_form': LoginForm},
name=u'login'),
url(ur'^logout/$', logout, {u'next_page': u'/login'}, name=u'logout'),
url(ur'^usuario/', include(UsuarioCrud.get_urls())),
url(ur'^home/atendimento/logout/$', logout, {u'next_page': u'/login'},
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'),
url(ur'^habilitar/(?P<pk>\d+)/edit$',
url(ur'^home/atendimento/habilitar/(?P<pk>\d+)/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'),
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'),

4
sigi/apps/usuarios/views.py

@ -55,7 +55,7 @@ class UsuarioCrud(Crud):
settings.EMAIL_HOST_USER]
send_mail(assunto, mensagem, remetente, destinatario,
fail_silently=False)
return reverse(u'home_atendimento')
return reverse(u'index_atendimento')
class ListView(LoginRequiredMixin, CrudListView):
pass
@ -169,7 +169,7 @@ class MudarSenhaView(FormValidMessageMixin, FormView):
return super(MudarSenhaView, self).form_valid(form)
def get_success_url(self):
return reverse(u'home')
return reverse(u'index_atendimento')
class ConfirmarEmailView(TemplateView):

16
sigi/settings/base.py

@ -134,6 +134,16 @@ SERVER_EMAIL = 'sigi@interlegis.leg.br'
DEFAULT_FROM_EMAIL = 'spdt@interlegis.leg.br'
EMAIL_SUBJECT_PREFIX = u'[SIGI]'
EMAIL_USE_TLS = True
EMAIL_PORT = 587
EMAIL_HOST = 'smtp.interlegis.leg.br'
EMAIL_HOST_USER = 'sapl-test'
EMAIL_HOST_PASSWORD = '2BhCwbGHcZ'
EMAIL_SEND_USER = 'atendimento@interlegis.leg.br'
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
TEMPLATE_DIRS = (
os.path.join(BASE_DIR, 'templates'),
)
@ -142,8 +152,10 @@ MEDIA_URL = '/media/'
SESSION_EXPIRE_AT_BROWSER_CLOSE = True
LOGIN_REDIRECT_URL = ''
LOGIN_URL = '/login/'
# LOGIN_REDIRECT_URL = ''
# LOGIN_URL = '/login/'
LOGIN_REDIRECT_URL = '/'
LOGIN_URL = '/login/?next='
# Using pytest directly (without a test runner)
TEST_RUNNER = None

Loading…
Cancel
Save