|
@ -1,5 +1,3 @@ |
|
|
from crispy_forms.helper import FormHelper |
|
|
|
|
|
from crispy_forms.layout import Layout, Fieldset, Submit, ButtonHolder |
|
|
|
|
|
from django.utils.translation import ugettext_lazy as _ |
|
|
from django.utils.translation import ugettext_lazy as _ |
|
|
from extra_views import InlineFormSetView |
|
|
from extra_views import InlineFormSetView |
|
|
from sapl.crud import build_crud |
|
|
from sapl.crud import build_crud |
|
@ -87,25 +85,8 @@ class ExpedienteView(InlineFormSetView): |
|
|
inline_model = ExpedienteSessao |
|
|
inline_model = ExpedienteSessao |
|
|
template_name = 'sessao/expediente.html' |
|
|
template_name = 'sessao/expediente.html' |
|
|
fields = ('tipo', 'conteudo') |
|
|
fields = ('tipo', 'conteudo') |
|
|
can_delete = False |
|
|
can_delete = True |
|
|
extra = 1 |
|
|
extra = 1 |
|
|
# import ipdb; ipdb.set_trace() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def get_context_data(self, **kwargs): |
|
|
|
|
|
context = super(ExpedienteView, self).get_context_data(**kwargs) |
|
|
|
|
|
|
|
|
|
|
|
self.helper = FormHelper() |
|
|
|
|
|
self.helper.layout = Layout( |
|
|
|
|
|
Fieldset( |
|
|
|
|
|
'tipo', |
|
|
|
|
|
'conteudo' |
|
|
|
|
|
) |
|
|
|
|
|
) |
|
|
|
|
|
context.update({'helper': self.helper}) |
|
|
|
|
|
|
|
|
|
|
|
# import ipdb; ipdb.set_trace() |
|
|
|
|
|
return context |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class PresencaView(InlineFormSetView): |
|
|
class PresencaView(InlineFormSetView): |
|
|