Add alphabetical ordering for services

This commit is contained in:
R. Miles McCain 2020-04-15 17:42:47 -04:00
parent 02d3241f6b
commit 841913fe33
No known key found for this signature in database
GPG Key ID: 91CB47BDDF2671A5
3 changed files with 38 additions and 0 deletions

View File

@ -0,0 +1,18 @@
# Generated by Django 3.0.5 on 2020-04-15 21:42
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('analytics', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='hit',
name='tracker',
field=models.TextField(choices=[('JS', 'JavaScript'), ('PIXEL', 'Pixel (noscript)')]),
),
]

View File

@ -0,0 +1,17 @@
# Generated by Django 3.0.5 on 2020-04-15 21:42
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('core', '0001_initial'),
]
operations = [
migrations.AlterModelOptions(
name='service',
options={'ordering': ['name', 'uuid']},
),
]

View File

@ -42,6 +42,9 @@ class Service(models.Model):
max_length=2, choices=SERVICE_STATUSES, default=ACTIVE, db_index=True max_length=2, choices=SERVICE_STATUSES, default=ACTIVE, db_index=True
) )
class Meta:
ordering = ["name", "uuid"]
def __str__(self): def __str__(self):
return self.name return self.name