Browse Source

Ordenacao padrão da Legislatura em ordem descrescente

pull/675/head
Edward Ribeiro 8 years ago
parent
commit
37c7bf894e
  1. 19
      sapl/parlamentares/migrations/0031_auto_20160929_1842.py
  2. 1
      sapl/parlamentares/models.py

19
sapl/parlamentares/migrations/0031_auto_20160929_1842.py

@ -0,0 +1,19 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-09-29 21:42
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('parlamentares', '0030_auto_20160928_0846'),
]
operations = [
migrations.AlterModelOptions(
name='sessaolegislativa',
options={'ordering': ['-data_inicio', '-data_fim'], 'verbose_name': 'Sessão Legislativa', 'verbose_name_plural': 'Sessões Legislativas'},
),
]

1
sapl/parlamentares/models.py

@ -63,6 +63,7 @@ class SessaoLegislativa(models.Model):
class Meta:
verbose_name = _('Sessão Legislativa')
verbose_name_plural = _('Sessões Legislativas')
ordering = ['-data_inicio', '-data_fim']
def __str__(self):
return _('%(numero)sº (%(inicio)s - %(fim)s)') % {

Loading…
Cancel
Save