Order sites by domain rather than by name

This commit is contained in:
Danielle McLean 2017-10-31 13:57:55 +11:00
parent 8a9f41759e
commit b053ba3c88
Signed by untrusted user: 00dani
GPG key ID: 5A5D2D1AFF12EEC5
2 changed files with 20 additions and 1 deletions

View file

@ -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',)},
),
]

View file

@ -25,7 +25,7 @@ class Site(models.Model):
return self.name return self.name
class Meta: class Meta:
ordering = ('name',) ordering = ('domain',)
class User(ModelMeta, AbstractUser): class User(ModelMeta, AbstractUser):