Browse Source

Fix #2509 (#2525)

pull/2527/head
Vinícius Cantuária 6 years ago
committed by Edward
parent
commit
cf7e513fbb
  1. 5
      sapl/audiencia/urls.py
  2. 5
      sapl/audiencia/views.py

5
sapl/audiencia/urls.py

@ -1,11 +1,10 @@
from django.conf.urls import include, url from django.conf.urls import include, url
from sapl.audiencia.views import (index, AudienciaCrud,AnexoAudienciaPublicaCrud) from sapl.audiencia.views import (index, AudienciaCrud, AnexoAudienciaPublicaCrud)
from .apps import AppConfig from .apps import AppConfig
app_name = AppConfig.name app_name = AppConfig.name
urlpatterns = [ urlpatterns = [
url(r'^audiencia/', include(AudienciaCrud.get_urls() + url(r'^audiencia/', include(AudienciaCrud.get_urls() + AnexoAudienciaPublicaCrud.get_urls())),
AnexoAudienciaPublicaCrud.get_urls())),
] ]

5
sapl/audiencia/views.py

@ -86,6 +86,7 @@ class AnexoAudienciaPublicaCrud(MasterDetailCrud):
model = AnexoAudienciaPublica model = AnexoAudienciaPublica
parent_field = 'audiencia' parent_field = 'audiencia'
help_topic = 'numeracao_docsacess' help_topic = 'numeracao_docsacess'
public = [RP_LIST, RP_DETAIL, ]
class BaseMixin(MasterDetailCrud.BaseMixin): class BaseMixin(MasterDetailCrud.BaseMixin):
list_field_names = ['assunto'] list_field_names = ['assunto']
@ -104,7 +105,5 @@ class AnexoAudienciaPublicaCrud(MasterDetailCrud):
kwargs = {self.crud.parent_field: self.kwargs['pk']} kwargs = {self.crud.parent_field: self.kwargs['pk']}
return qs.filter(**kwargs).order_by('-data', '-id') return qs.filter(**kwargs).order_by('-data', '-id')
class DetailView(AudienciaPublicaMixin, class DetailView(AudienciaPublicaMixin, MasterDetailCrud.DetailView):
MasterDetailCrud.DetailView):
pass pass
Loading…
Cancel
Save