mirror of
https://github.com/daniviga/django-ram.git
synced 2025-08-04 21:27:49 +02:00
Gauge vs track
This commit is contained in:
@@ -27,8 +27,8 @@ class DecoderAdmin(admin.ModelAdmin):
|
||||
|
||||
@admin.register(Scale)
|
||||
class ScaleAdmin(admin.ModelAdmin):
|
||||
list_display = ("scale", "ratio", "gauge")
|
||||
list_filter = ("ratio", "gauge")
|
||||
list_display = ("scale", "ratio", "gauge", "track")
|
||||
list_filter = ("ratio", "gauge", "track")
|
||||
search_fields = list_display
|
||||
|
||||
|
||||
|
18
ram/metadata/migrations/0005_rename_gauge_scale_track.py
Normal file
18
ram/metadata/migrations/0005_rename_gauge_scale_track.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 4.0.6 on 2022-07-18 21:40
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('metadata', '0004_alter_rollingstocktype_options_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RenameField(
|
||||
model_name='scale',
|
||||
old_name='gauge',
|
||||
new_name='track',
|
||||
),
|
||||
]
|
18
ram/metadata/migrations/0006_scale_gauge.py
Normal file
18
ram/metadata/migrations/0006_scale_gauge.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 4.0.6 on 2022-07-18 21:41
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('metadata', '0005_rename_gauge_scale_track'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='scale',
|
||||
name='gauge',
|
||||
field=models.CharField(blank=True, max_length=16),
|
||||
),
|
||||
]
|
@@ -85,6 +85,7 @@ class Scale(models.Model):
|
||||
scale = models.CharField(max_length=32, unique=True)
|
||||
ratio = models.CharField(max_length=16, blank=True)
|
||||
gauge = models.CharField(max_length=16, blank=True)
|
||||
track = models.CharField(max_length=16, blank=True)
|
||||
|
||||
class Meta:
|
||||
ordering = ["scale"]
|
||||
|
Reference in New Issue
Block a user