fix(itama): Add missing attribute Meta.verbose_name to "Device Model" model

ref:  #248 #345 #346
This commit is contained in:
2024-10-13 16:57:19 +09:30
parent 6ecaa08782
commit b57df0d5bc
2 changed files with 35 additions and 11 deletions

View File

@ -0,0 +1,17 @@
# Generated by Django 5.1.2 on 2024-10-13 07:26
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('itam', '0006_alter_device_options'),
]
operations = [
migrations.AlterModelOptions(
name='devicemodel',
options={'ordering': ['manufacturer', 'name'], 'verbose_name': 'Device Model', 'verbose_name_plural': 'Device Models'},
),
]

View File

@ -20,6 +20,8 @@ class DeviceModel(DeviceCommonFieldsName, SaveHistory):
'name',
]
verbose_name = 'Device Model'
verbose_name_plural = 'Device Models'
@ -31,14 +33,6 @@ class DeviceModel(DeviceCommonFieldsName, SaveHistory):
blank= True
)
table_fields: list = [
'manufacturer',
'name',
'organization',
'created',
'modified'
]
page_layout: dict = [
{
"name": "Details",
@ -50,18 +44,31 @@ class DeviceModel(DeviceCommonFieldsName, SaveHistory):
'organization',
'manufacturer',
'name',
'created',
'modified',
'is_global',
],
"right": [
'model_notes',
'is_global',
'created',
'modified',
]
}
]
},
{
"name": "Notes",
"slug": "notes",
"sections": []
}
]
table_fields: list = [
'manufacturer',
'name',
'organization',
'created',
'modified'
]
def clean(self):