|
@ -14,7 +14,8 @@ from sapl.materia.models import Proposicao, Relatoria |
|
|
from sapl.parlamentares.apps import AppConfig |
|
|
from sapl.parlamentares.apps import AppConfig |
|
|
|
|
|
|
|
|
from .forms import (FiliacaoForm, LegislaturaCreateForm, LegislaturaUpdateForm, |
|
|
from .forms import (FiliacaoForm, LegislaturaCreateForm, LegislaturaUpdateForm, |
|
|
ParlamentarCreateForm, ParlamentarForm, VotanteForm) |
|
|
MandatoForm, ParlamentarCreateForm, ParlamentarForm, |
|
|
|
|
|
VotanteForm) |
|
|
from .models import (CargoMesa, Coligacao, ComposicaoColigacao, ComposicaoMesa, |
|
|
from .models import (CargoMesa, Coligacao, ComposicaoColigacao, ComposicaoMesa, |
|
|
Dependente, Filiacao, Frente, Legislatura, Mandato, |
|
|
Dependente, Filiacao, Frente, Legislatura, Mandato, |
|
|
NivelInstrucao, Parlamentar, Partido, SessaoLegislativa, |
|
|
NivelInstrucao, Parlamentar, Partido, SessaoLegislativa, |
|
@ -195,6 +196,13 @@ class MandatoCrud(MasterDetailCrud): |
|
|
class ListView(MasterDetailCrud.ListView): |
|
|
class ListView(MasterDetailCrud.ListView): |
|
|
ordering = ('-legislatura__numero') |
|
|
ordering = ('-legislatura__numero') |
|
|
|
|
|
|
|
|
|
|
|
class CreateView(MasterDetailCrud.CreateView): |
|
|
|
|
|
form_class = MandatoForm |
|
|
|
|
|
|
|
|
|
|
|
def get_initial(self): |
|
|
|
|
|
return {'parlamentar': Parlamentar.objects.get( |
|
|
|
|
|
pk=self.kwargs['pk'])} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class ComposicaoColigacaoCrud(MasterDetailCrud): |
|
|
class ComposicaoColigacaoCrud(MasterDetailCrud): |
|
|
model = ComposicaoColigacao |
|
|
model = ComposicaoColigacao |
|
|