diff --git a/sapl/norma/migrations/0028_auto_20161202_1025.py b/sapl/norma/migrations/0028_auto_20161202_1025.py new file mode 100644 index 000000000..2bfebb011 --- /dev/null +++ b/sapl/norma/migrations/0028_auto_20161202_1025.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.7 on 2016-12-02 10:25 +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('norma', '0027_auto_20161123_1538'), + ] + + operations = [ + migrations.AlterField( + model_name='normajuridica', + name='materia', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='materia.MateriaLegislativa', verbose_name='Matéria'), + ), + ] diff --git a/sapl/norma/models.py b/sapl/norma/models.py index 5b30933e6..442340540 100644 --- a/sapl/norma/models.py +++ b/sapl/norma/models.py @@ -68,7 +68,8 @@ class NormaJuridica(models.Model): verbose_name=_('Texto Integral')) tipo = models.ForeignKey( TipoNormaJuridica, verbose_name=_('Tipo da Norma Juridica')) - materia = models.ForeignKey(MateriaLegislativa, blank=True, null=True) + materia = models.ForeignKey( + MateriaLegislativa, blank=True, null=True, verbose_name=_('Matéria')) numero = models.PositiveIntegerField(verbose_name=_('Número')) ano = models.PositiveSmallIntegerField(verbose_name=_('Ano'), choices=RANGE_ANOS)