diff --git a/materia/forms.py b/materia/forms.py index 6c22e5daf..88c15e7d1 100644 --- a/materia/forms.py +++ b/materia/forms.py @@ -120,6 +120,8 @@ class DocumentoAcessorioForm(ModelForm): model = DocumentoAcessorio fields = ['tipo', 'nome', 'data', 'autor', 'ementa'] + widgets = {'autor': forms.HiddenInput()} + def clean_autor(self): autor_field = self.cleaned_data['autor'] try: diff --git a/materia/views.py b/materia/views.py index bc6d0a651..dc8b8b22f 100644 --- a/materia/views.py +++ b/materia/views.py @@ -154,7 +154,7 @@ class DocumentoAcessorioCrud(MasterDetailCrud): crispy_layout_mixin.to_row(self.get_layout()[0][2]), crispy_layout_mixin.to_row(self.get_layout()[0][3]), ) - # self.helper.layout[3][0][0] = autor_row + self.helper.layout[3] = autor_row # import ipdb; ipdb.set_trace() def get_context_data(self, **kwargs):