|
|
@ -7,11 +7,13 @@ from django.views.generic.base import RedirectView |
|
|
|
|
|
|
|
from sapl.base.models import AppConfig |
|
|
|
from sapl.compilacao.views import IntegracaoTaView |
|
|
|
from sapl.crud.base import RP_DETAIL, RP_LIST, Crud, CrudAux, make_pagination |
|
|
|
from sapl.crud.base import (RP_DETAIL, RP_LIST, Crud, CrudAux, |
|
|
|
MasterDetailCrud, make_pagination) |
|
|
|
from sapl.norma.forms import NormaJuridicaForm |
|
|
|
|
|
|
|
from .forms import NormaJuridicaPesquisaForm |
|
|
|
from .models import AssuntoNorma, NormaJuridica, TipoNormaJuridica |
|
|
|
from .models import (AssuntoNorma, AssuntoNormaRelationship, NormaJuridica, |
|
|
|
TipoNormaJuridica) |
|
|
|
|
|
|
|
# LegislacaoCitadaCrud = Crud.build(LegislacaoCitada, '') |
|
|
|
AssuntoNormaCrud = CrudAux.build(AssuntoNorma, 'assunto_norma_juridica', |
|
|
@ -39,6 +41,17 @@ class NormaTaView(IntegracaoTaView): |
|
|
|
return self.get_redirect_deactivated() |
|
|
|
|
|
|
|
|
|
|
|
class AssuntoNormaRelationshipCrud(MasterDetailCrud): |
|
|
|
model = AssuntoNormaRelationship |
|
|
|
parent_field = 'norma' |
|
|
|
help_path = '' |
|
|
|
public = [RP_LIST, RP_DETAIL] |
|
|
|
|
|
|
|
class BaseMixin(MasterDetailCrud.BaseMixin): |
|
|
|
list_field_names = ['assunto'] |
|
|
|
ordering = 'assunto' |
|
|
|
|
|
|
|
|
|
|
|
class NormaCrud(Crud): |
|
|
|
model = NormaJuridica |
|
|
|
help_path = 'norma_juridica' |
|
|
|