|
@ -27,6 +27,10 @@ class NormaCrud(Crud): |
|
|
class UpdateView(crud.base.CrudUpdateView): |
|
|
class UpdateView(crud.base.CrudUpdateView): |
|
|
form_class = NormaJuridicaForm |
|
|
form_class = NormaJuridicaForm |
|
|
|
|
|
|
|
|
|
|
|
@property |
|
|
|
|
|
def layout_key(self): |
|
|
|
|
|
return 'NormaJuridicaCreate' |
|
|
|
|
|
|
|
|
def get_initial(self): |
|
|
def get_initial(self): |
|
|
norma = NormaJuridica.objects.get(id=self.kwargs['pk']) |
|
|
norma = NormaJuridica.objects.get(id=self.kwargs['pk']) |
|
|
if norma.materia: |
|
|
if norma.materia: |
|
@ -38,6 +42,10 @@ class NormaCrud(Crud): |
|
|
class CreateView(crud.base.CrudCreateView): |
|
|
class CreateView(crud.base.CrudCreateView): |
|
|
form_class = NormaJuridicaForm |
|
|
form_class = NormaJuridicaForm |
|
|
|
|
|
|
|
|
|
|
|
@property |
|
|
|
|
|
def layout_key(self): |
|
|
|
|
|
return 'NormaJuridicaCreate' |
|
|
|
|
|
|
|
|
class BaseMixin(crud.base.BaseMixin): |
|
|
class BaseMixin(crud.base.BaseMixin): |
|
|
list_field_names = ['tipo', 'numero', 'ano', 'ementa'] |
|
|
list_field_names = ['tipo', 'numero', 'ano', 'ementa'] |
|
|
|
|
|
|
|
|