Tweaked Module ordering

This commit is contained in:
Jeremy Stretch 2016-03-28 17:36:02 -04:00
parent d096d35891
commit 690ad29ab8
2 changed files with 20 additions and 1 deletions

View File

@ -0,0 +1,19 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-03-28 21:35
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('dcim', '0004_auto_20160328_2109'),
]
operations = [
migrations.AlterModelOptions(
name='module',
options={'ordering': ['device__id', 'parent__id', 'name']},
),
]

View File

@ -682,7 +682,7 @@ class Module(models.Model):
serial = models.CharField(max_length=50, verbose_name='Serial number', blank=True)
class Meta:
ordering = ['device', 'parent', 'name']
ordering = ['device__id', 'parent__id', 'name']
unique_together = ['device', 'parent', 'name']
def __unicode__(self):