Browse Source

Ordena assunto norma e coloca esfera na ordem do sapl 25 (#1449)

* Ordena assunto norma e coloca esfera na ordem do sapl 25

* adiciona migrations
pull/1456/head
Rogério Frá 7 years ago
committed by Edward
parent
commit
1ca31a0f39
  1. 24
      sapl/norma/migrations/0007_auto_20170904_1708.py
  2. 3
      sapl/norma/models.py

24
sapl/norma/migrations/0007_auto_20170904_1708.py

@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2017-09-04 17:08
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('norma', '0006_normajuridica_data_ultima_atualizacao'),
]
operations = [
migrations.AlterModelOptions(
name='assuntonorma',
options={'ordering': ['assunto'], 'verbose_name': 'Assunto de Norma Jurídica', 'verbose_name_plural': 'Assuntos de Normas Jurídicas'},
),
migrations.AlterField(
model_name='normajuridica',
name='esfera_federacao',
field=models.CharField(choices=[('M', 'Municipal'), ('E', 'Estadual'), ('F', 'Federal')], max_length=1, verbose_name='Esfera Federação'),
),
]

3
sapl/norma/models.py

@ -20,6 +20,7 @@ class AssuntoNorma(models.Model):
class Meta:
verbose_name = _('Assunto de Norma Jurídica')
verbose_name_plural = _('Assuntos de Normas Jurídicas')
ordering = ['assunto']
def __str__(self):
return self.assunto
@ -67,9 +68,9 @@ def norma_upload_path(instance, filename):
@reversion.register()
class NormaJuridica(models.Model):
ESFERA_FEDERACAO_CHOICES = Choices(
('M', 'municipal', _('Municipal')),
('E', 'estadual', _('Estadual')),
('F', 'federal', _('Federal')),
('M', 'municipal', _('Municipal')),
)
texto_integral = models.FileField(

Loading…
Cancel
Save