|
@ -87,8 +87,7 @@ class FrenteList(MasterDetailCrud): |
|
|
CreateView, UpdateView, DeleteView = None, None, None |
|
|
CreateView, UpdateView, DeleteView = None, None, None |
|
|
|
|
|
|
|
|
class BaseMixin(Crud.PublicMixin, MasterDetailCrud.BaseMixin): |
|
|
class BaseMixin(Crud.PublicMixin, MasterDetailCrud.BaseMixin): |
|
|
list_field_names = ['nome', 'data_criacao'] |
|
|
list_field_names = ['nome', 'data_criacao', 'data_extincao'] |
|
|
|
|
|
|
|
|
@classmethod |
|
|
@classmethod |
|
|
def url_name(cls, suffix): |
|
|
def url_name(cls, suffix): |
|
|
return '%s_parlamentar_%s' % (cls.model._meta.model_name, suffix) |
|
|
return '%s_parlamentar_%s' % (cls.model._meta.model_name, suffix) |
|
@ -282,7 +281,8 @@ class FrenteCrud(CrudAux): |
|
|
model = Frente |
|
|
model = Frente |
|
|
help_topic = 'tipo_situa_militar' |
|
|
help_topic = 'tipo_situa_militar' |
|
|
public = [RP_DETAIL, RP_LIST] |
|
|
public = [RP_DETAIL, RP_LIST] |
|
|
list_field_names = ['nome', 'data_criacao', 'parlamentares'] |
|
|
list_field_names = ['nome', 'data_criacao', 'data_extincao', 'parlamentares'] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class CreateView(Crud.CreateView): |
|
|
class CreateView(Crud.CreateView): |
|
|
form_class = FrenteForm |
|
|
form_class = FrenteForm |
|
@ -290,6 +290,10 @@ class FrenteCrud(CrudAux): |
|
|
def form_valid(self, form): |
|
|
def form_valid(self, form): |
|
|
return super(Crud.CreateView, self).form_valid(form) |
|
|
return super(Crud.CreateView, self).form_valid(form) |
|
|
|
|
|
|
|
|
|
|
|
class UpdateView(Crud.UpdateView): |
|
|
|
|
|
form_class = FrenteForm |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class MandatoCrud(MasterDetailCrud): |
|
|
class MandatoCrud(MasterDetailCrud): |
|
|
model = Mandato |
|
|
model = Mandato |
|
|