From 99c04b9990ab4f8299ffdc943cea181694b59b05 Mon Sep 17 00:00:00 2001 From: guimoz Date: Tue, 5 Sep 2017 14:43:40 +0200 Subject: [PATCH] =?UTF-8?q?Classement=20des=20chambres=20par=20orde=20alph?= =?UTF-8?q?ab=C3=A9tique?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../migrations/0027_auto_20170905_1442.py | 24 +++++++++++++++++++ topologie/models.py | 3 +++ 2 files changed, 27 insertions(+) create mode 100644 topologie/migrations/0027_auto_20170905_1442.py diff --git a/topologie/migrations/0027_auto_20170905_1442.py b/topologie/migrations/0027_auto_20170905_1442.py new file mode 100644 index 00000000..5f6a682e --- /dev/null +++ b/topologie/migrations/0027_auto_20170905_1442.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.7 on 2017-09-05 12:42 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('topologie', '0026_auto_20170902_1245'), + ] + + operations = [ + migrations.AlterModelOptions( + name='room', + options={'ordering': ['name']}, + ), + migrations.AlterField( + model_name='port', + name='radius', + field=models.CharField(choices=[('NO', 'NO'), ('STRICT', 'STRICT'), ('BLOQ', 'BLOQ'), ('COMMON', 'COMMON')], default='NO', max_length=32), + ), + ] diff --git a/topologie/models.py b/topologie/models.py index 2ce5d609..ac34e38c 100644 --- a/topologie/models.py +++ b/topologie/models.py @@ -135,6 +135,9 @@ class Room(models.Model): name = models.CharField(max_length=255, unique=True) details = models.CharField(max_length=255, blank=True) + class Meta: + ordering = ['name'] + def __str__(self): return str(self.name)