From 37c7bf894ea57fa7a65087894fb432a0cf44b128 Mon Sep 17 00:00:00 2001 From: Edward Ribeiro Date: Thu, 29 Sep 2016 18:43:24 -0300 Subject: [PATCH] =?UTF-8?q?Ordenacao=20padr=C3=A3o=20da=20Legislatura=20em?= =?UTF-8?q?=20ordem=20descrescente?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../migrations/0031_auto_20160929_1842.py | 19 +++++++++++++++++++ sapl/parlamentares/models.py | 1 + 2 files changed, 20 insertions(+) create mode 100644 sapl/parlamentares/migrations/0031_auto_20160929_1842.py diff --git a/sapl/parlamentares/migrations/0031_auto_20160929_1842.py b/sapl/parlamentares/migrations/0031_auto_20160929_1842.py new file mode 100644 index 000000000..6e920f5d5 --- /dev/null +++ b/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'}, + ), + ] diff --git a/sapl/parlamentares/models.py b/sapl/parlamentares/models.py index e1d414f3b..0c06c8746 100644 --- a/sapl/parlamentares/models.py +++ b/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)') % {