Browse Source

Add crud for TipoComissao

pull/6/head
Marcio Mazza 10 years ago
parent
commit
8f95028cc1
  1. 14
      comissoes/views.py
  2. 7
      sapl/urls.py

14
comissoes/views.py

@ -1,10 +1,20 @@
from django.utils.translation import ugettext_lazy as _
from comissoes.models import Comissao
from comissoes.models import TipoComissao, Comissao
from sapl.crud import build_crud
comissao_crud = build_crud(Comissao,
tipo_comissao_crud = build_crud(
TipoComissao,
[_('Tipo Comissão'),
[('nome', 3), ('sigla', 2)],
[('dispositivo_regimental', 2), ('natureza', 2)],
],
)
comissao_crud = build_crud(
Comissao,
[_('Dados Básicos'),
[('nome', 9), ('sigla', 3)],

7
sapl/urls.py

@ -17,12 +17,17 @@ from django.conf.urls import include, url
from django.contrib import admin
from django.views.generic.base import TemplateView
from comissoes.views import comissao_crud
from comissoes.views import tipo_comissao_crud, comissao_crud
urlpatterns = [
url(r'^$', TemplateView.as_view(template_name='index.html')),
url(r'^admin/', include(admin.site.urls)),
# main apps
url(r'^comissoes/', include(comissao_crud.urls)),
url(r'^sessao/', include('sessao.urls')),
# system data
url(r'^sistema/comissoes/tipo/', include(tipo_comissao_crud.urls)),
]

Loading…
Cancel
Save