diff --git a/sapl/sessao/migrations/0025_auto_20160919_1503.py b/sapl/sessao/migrations/0025_auto_20160919_1503.py new file mode 100644 index 000000000..fe7060645 --- /dev/null +++ b/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'), + ), + ] diff --git a/sapl/sessao/models.py b/sapl/sessao/models.py index 8f29bc99d..b8b24043a 100644 --- a/sapl/sessao/models.py +++ b/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( diff --git a/sapl/sessao/views.py b/sapl/sessao/views.py index b51000a2e..47d3b39e5 100644 --- a/sapl/sessao/views.py +++ b/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) diff --git a/sapl/templates/sessao/layouts.yaml b/sapl/templates/sessao/layouts.yaml index b92333de1..18044db77 100644 --- a/sapl/templates/sessao/layouts.yaml +++ b/sapl/templates/sessao/layouts.yaml @@ -75,5 +75,5 @@ Bloco: {% trans 'Bloco' %}: - nome - data_criacao data_extincao - - bancadas + - partidos - descricao