Add alphabetical ordering for services
This commit is contained in:
parent
02d3241f6b
commit
841913fe33
18
shynet/analytics/migrations/0002_auto_20200415_1742.py
Normal file
18
shynet/analytics/migrations/0002_auto_20200415_1742.py
Normal 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)')]),
|
||||||
|
),
|
||||||
|
]
|
17
shynet/core/migrations/0002_auto_20200415_1742.py
Normal file
17
shynet/core/migrations/0002_auto_20200415_1742.py
Normal 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']},
|
||||||
|
),
|
||||||
|
]
|
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user