|
@ -1,6 +1,7 @@ |
|
|
from datetime import datetime |
|
|
from datetime import datetime |
|
|
from re import sub |
|
|
from re import sub |
|
|
|
|
|
|
|
|
|
|
|
from django.contrib import messages |
|
|
from django.core.exceptions import ObjectDoesNotExist |
|
|
from django.core.exceptions import ObjectDoesNotExist |
|
|
from django.core.urlresolvers import reverse |
|
|
from django.core.urlresolvers import reverse |
|
|
from django.forms.utils import ErrorList |
|
|
from django.forms.utils import ErrorList |
|
@ -66,6 +67,9 @@ class PresencaView(FormMixin, sessao_crud.CrudDetailView): |
|
|
sessao.parlamentar = Parlamentar.objects.get(id=p) |
|
|
sessao.parlamentar = Parlamentar.objects.get(id=p) |
|
|
sessao.save() |
|
|
sessao.save() |
|
|
|
|
|
|
|
|
|
|
|
msg = _('Presença em Sessão salva com sucesso!') |
|
|
|
|
|
messages.add_message(request, messages.SUCCESS, msg) |
|
|
|
|
|
|
|
|
return self.form_valid(form) |
|
|
return self.form_valid(form) |
|
|
else: |
|
|
else: |
|
|
return self.form_invalid(form) |
|
|
return self.form_invalid(form) |
|
@ -124,6 +128,9 @@ class PresencaOrdemDiaView(FormMixin, sessao_crud.CrudDetailView): |
|
|
ordem.parlamentar = Parlamentar.objects.get(id=p) |
|
|
ordem.parlamentar = Parlamentar.objects.get(id=p) |
|
|
ordem.save() |
|
|
ordem.save() |
|
|
|
|
|
|
|
|
|
|
|
msg = _('Presença em Ordem do Dia salva com sucesso!') |
|
|
|
|
|
messages.add_message(request, messages.SUCCESS, msg) |
|
|
|
|
|
|
|
|
return self.form_valid(form) |
|
|
return self.form_valid(form) |
|
|
else: |
|
|
else: |
|
|
return self.form_invalid(form) |
|
|
return self.form_invalid(form) |
|
|