|
@ -29,19 +29,27 @@ TipoMilitarCrud = Crud.build(SituacaoMilitar, 'tipo_situa_militar') |
|
|
|
|
|
|
|
|
DependenteCrud = MasterDetailCrud.build(Dependente, 'parlamentar', '') |
|
|
DependenteCrud = MasterDetailCrud.build(Dependente, 'parlamentar', '') |
|
|
MandatoCrud = MasterDetailCrud.build(Mandato, 'parlamentar', '') |
|
|
MandatoCrud = MasterDetailCrud.build(Mandato, 'parlamentar', '') |
|
|
FiliacaoCrud = MasterDetailCrud.build(Filiacao, 'parlamentar', '') |
|
|
# FiliacaoCrud = MasterDetailCrud.build(Filiacao, 'parlamentar', '') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# class FiliacaoCrud(MasterDetailCrud): |
|
|
class FiliacaoCrud(MasterDetailCrud): |
|
|
# model = Filiacao |
|
|
model = Filiacao |
|
|
# parent_field = 'parlamentar' |
|
|
parent_field = 'parlamentar' |
|
|
# help_path = '' |
|
|
help_path = '' |
|
|
# |
|
|
|
|
|
# class CreateView(crud.masterdetail.CrudCreateView): |
|
|
class CreateView(crud.masterdetail.CrudCreateView): |
|
|
# form_class = FiliacaoForm |
|
|
form_class = FiliacaoForm |
|
|
# |
|
|
|
|
|
# class UpdateView(crud.masterdetail.CrudUpdateView): |
|
|
@classmethod |
|
|
# form_class = FiliacaoForm |
|
|
def get_url_regex(self): |
|
|
|
|
|
return r'^(?P<pk>\d+)/%s/create$' % self.model._meta.model_name |
|
|
|
|
|
|
|
|
|
|
|
class UpdateView(crud.masterdetail.CrudUpdateView): |
|
|
|
|
|
form_class = FiliacaoForm |
|
|
|
|
|
|
|
|
|
|
|
@classmethod |
|
|
|
|
|
def get_url_regex(self): |
|
|
|
|
|
return r'^%s/(?P<pk>\d+)/edit$' % self.model._meta.model_name |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class ParlamentarCrud(Crud): |
|
|
class ParlamentarCrud(Crud): |
|
|