Browse Source

Muda bancadas por partidos em Bloco

pull/588/merge
Eduardo Edson Batista Cordeiro Alves 8 years ago
parent
commit
4ba98154cb
  1. 25
      sapl/sessao/migrations/0025_auto_20160919_1503.py
  2. 4
      sapl/sessao/models.py
  3. 2
      sapl/sessao/views.py
  4. 2
      sapl/templates/sessao/layouts.yaml

25
sapl/sessao/migrations/0025_auto_20160919_1503.py

@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-09-19 18:03
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('parlamentares', '0027_merge'),
('sessao', '0024_bloco'),
]
operations = [
migrations.RemoveField(
model_name='bloco',
name='bancadas',
),
migrations.AddField(
model_name='bloco',
name='partidos',
field=models.ManyToManyField(blank=True, to='parlamentares.Partido', verbose_name='Bancadas'),
),
]

4
sapl/sessao/models.py

@ -329,8 +329,8 @@ class Bloco(models.Model):
'''
nome = models.CharField(
max_length=80, verbose_name=_('Nome do Bloco'))
bancadas = models.ManyToManyField(
Bancada, blank=True, verbose_name=_('Bancadas'))
partidos = models.ManyToManyField(
Partido, blank=True, verbose_name=_('Bancadas'))
data_criacao = models.DateField(
blank=True, null=True, verbose_name=_('Data Criação'))
data_extincao = models.DateField(

2
sapl/sessao/views.py

@ -74,7 +74,7 @@ class BlocoCrud(Crud):
help_path = ''
class BaseMixin(PermissionRequiredMixin, CrudBaseMixin):
list_field_names = ['nome', 'data_criacao', 'bancadas']
list_field_names = ['nome', 'data_criacao', 'partidos']
def has_permission(self):
return permissao_tb_aux(self)

2
sapl/templates/sessao/layouts.yaml

@ -75,5 +75,5 @@ Bloco:
{% trans 'Bloco' %}:
- nome
- data_criacao data_extincao
- bancadas
- partidos
- descricao

Loading…
Cancel
Save