Browse Source

Add initial scaffolding of Comissao: inserir parlamentar

pull/11/merge
Edward Ribeiro 9 years ago
parent
commit
9a2545c576
  1. 3
      comissoes/urls.py
  2. 9
      comissoes/views.py
  3. 8
      templates/comissoes/comissao_parlamentar.html
  4. 10
      templates/comissoes/composicao.html

3
comissoes/urls.py

@ -2,11 +2,14 @@ from django.conf.urls import include, url
from comissoes.views import (ComposicaoView, MateriasView, ReunioesView,
cargo_crud, comissao_crud,
ComissaoParlamentarIncluirView,
periodo_composicao_crud, tipo_comissao_crud)
comissao_url_patterns = comissao_crud.urlpatterns + [
url(r'^(?P<pk>\d+)/composicao$',
ComposicaoView.as_view(), name='composicao'),
url(r'^(?P<pk>\d+)/composicao/parlamentar',
ComissaoParlamentarIncluirView.as_view(), name='comissao_parlamentar'),
url(r'^(?P<pk>\d+)/materias$',
MateriasView.as_view(), name='materias'),
url(r'^(?P<pk>\d+)/reunioes$',

9
comissoes/views.py

@ -4,6 +4,9 @@ from sapl.crud import build_crud
from .models import CargoComissao, Comissao, Periodo, TipoComissao
from django.views.generic.edit import FormMixin
from vanilla import GenericView
cargo_crud = build_crud(
CargoComissao, 'cargo_comissao', [
@ -65,3 +68,9 @@ class MateriasView(comissao_crud.CrudDetailView):
class ReunioesView(comissao_crud.CrudDetailView):
template_name = 'comissoes/reunioes.html'
class ComissaoParlamentarIncluirView(GenericView):
template_name = "comissoes/comissao_parlamentar.html"

8
templates/comissoes/comissao_parlamentar.html

@ -0,0 +1,8 @@
{% extends "comissoes/comissao_detail.html" %}
{% load i18n %}
{% load crispy_forms_tags %}
<h2>Incluir Parlamentar</h2>
{% block detail_content %}
{% endblock detail_content %}

10
templates/comissoes/composicao.html

@ -1,8 +1,10 @@
{% extends "comissoes/comissao_detail.html" %}
{% load i18n %}
{% load crispy_forms_tags %}
{% block actions %}{% endblock actions %}
<h2>Composição</h2>
{% block detail_content %}
TODO ... Composição
{% endblock detail_content %}
<a href="" class="button primary">Incluir Parlamentar</a>
{% endblock detail_content %}
Loading…
Cancel
Save