mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-23 08:22:15 +00:00
FIX: Order asset categories/statuses alphabetically
Instead of by pk because that's silly.
This commit is contained in:
21
assets/migrations/0009_auto_20200102_1933.py
Normal file
21
assets/migrations/0009_auto_20200102_1933.py
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
# Generated by Django 2.0.13 on 2020-01-02 19:33
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('assets', '0008_auto_20191206_2124'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterModelOptions(
|
||||||
|
name='assetcategory',
|
||||||
|
options={'ordering': ['name'], 'verbose_name': 'Asset Category', 'verbose_name_plural': 'Asset Categories'},
|
||||||
|
),
|
||||||
|
migrations.AlterModelOptions(
|
||||||
|
name='assetstatus',
|
||||||
|
options={'ordering': ['name'], 'verbose_name': 'Asset Status', 'verbose_name_plural': 'Asset Statuses'},
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -16,6 +16,7 @@ class AssetCategory(models.Model):
|
|||||||
class Meta:
|
class Meta:
|
||||||
verbose_name = 'Asset Category'
|
verbose_name = 'Asset Category'
|
||||||
verbose_name_plural = 'Asset Categories'
|
verbose_name_plural = 'Asset Categories'
|
||||||
|
ordering = ['name']
|
||||||
|
|
||||||
name = models.CharField(max_length=80)
|
name = models.CharField(max_length=80)
|
||||||
|
|
||||||
@@ -27,6 +28,7 @@ class AssetStatus(models.Model):
|
|||||||
class Meta:
|
class Meta:
|
||||||
verbose_name = 'Asset Status'
|
verbose_name = 'Asset Status'
|
||||||
verbose_name_plural = 'Asset Statuses'
|
verbose_name_plural = 'Asset Statuses'
|
||||||
|
ordering = ['name']
|
||||||
|
|
||||||
name = models.CharField(max_length=80)
|
name = models.CharField(max_length=80)
|
||||||
should_show = models.BooleanField(
|
should_show = models.BooleanField(
|
||||||
|
|||||||
Reference in New Issue
Block a user