Browse Source

Esconde campo não usado de autor

pull/410/head
Eduardo Edson Batista Cordeiro Alves 10 years ago
parent
commit
dc396c143d
  1. 2
      materia/forms.py
  2. 2
      materia/views.py

2
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:

2
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):

Loading…
Cancel
Save