From 5df5ae76f3deb35f600a732e99647623f6e71de7 Mon Sep 17 00:00:00 2001 From: Edward Ribeiro Date: Fri, 29 Apr 2016 13:47:41 -0300 Subject: [PATCH] =?UTF-8?q?Adiciona=20ordena=C3=A7=C3=A3o=20padr=C3=A3o=20?= =?UTF-8?q?na=20busca=20de=20Numera=C3=A7=C3=A3o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- materia/migrations/0030_auto_20160429_1349.py | 19 +++++++++++++++++++ materia/models.py | 5 +++++ 2 files changed, 24 insertions(+) create mode 100644 materia/migrations/0030_auto_20160429_1349.py diff --git a/materia/migrations/0030_auto_20160429_1349.py b/materia/migrations/0030_auto_20160429_1349.py new file mode 100644 index 000000000..cfd764719 --- /dev/null +++ b/materia/migrations/0030_auto_20160429_1349.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9 on 2016-04-29 16:49 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('materia', '0029_auto_20160428_1020'), + ] + + operations = [ + migrations.AlterModelOptions( + name='numeracao', + options={'ordering': ('materia', 'tipo_materia', 'numero_materia', 'ano_materia', 'data_materia'), 'verbose_name': 'Numeração', 'verbose_name_plural': 'Numerações'}, + ), + ] diff --git a/materia/models.py b/materia/models.py index 28dc52e80..15e3e2590 100644 --- a/materia/models.py +++ b/materia/models.py @@ -317,6 +317,11 @@ class Numeracao(models.Model): class Meta: verbose_name = _('Numeração') verbose_name_plural = _('Numerações') + ordering = ('materia', + 'tipo_materia', + 'numero_materia', + 'ano_materia', + 'data_materia',) def __str__(self): return _('Nº%(numero)s %(tipo)s - %(data)s') % {