From b053ba3c88598018edd9f8250609d2b5d0acc418 Mon Sep 17 00:00:00 2001 From: Danielle McLean Date: Tue, 31 Oct 2017 13:57:55 +1100 Subject: [PATCH] Order sites by domain rather than by name --- users/migrations/0008_auto_20171031_1357.py | 19 +++++++++++++++++++ users/models.py | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 users/migrations/0008_auto_20171031_1357.py diff --git a/users/migrations/0008_auto_20171031_1357.py b/users/migrations/0008_auto_20171031_1357.py new file mode 100644 index 0000000..eadb686 --- /dev/null +++ b/users/migrations/0008_auto_20171031_1357.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.6 on 2017-10-31 02:57 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('users', '0007_auto_20171031_1347'), + ] + + operations = [ + migrations.AlterModelOptions( + name='site', + options={'ordering': ('domain',)}, + ), + ] diff --git a/users/models.py b/users/models.py index d372359..bdf378f 100644 --- a/users/models.py +++ b/users/models.py @@ -25,7 +25,7 @@ class Site(models.Model): return self.name class Meta: - ordering = ('name',) + ordering = ('domain',) class User(ModelMeta, AbstractUser):