From dc396c143dbab72293cb72bb77263c7a052c9c76 Mon Sep 17 00:00:00 2001 From: Eduardo Edson Batista Cordeiro Alves Date: Mon, 9 May 2016 11:19:58 -0300 Subject: [PATCH] =?UTF-8?q?Esconde=20campo=20n=C3=A3o=20usado=20de=20autor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- materia/forms.py | 2 ++ materia/views.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) 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):