mirror of
https://github.com/daniviga/django-ram.git
synced 2025-08-04 05:07:50 +02:00
Expose tracks
This commit is contained in:
@@ -27,8 +27,8 @@ class DecoderAdmin(admin.ModelAdmin):
|
|||||||
|
|
||||||
@admin.register(Scale)
|
@admin.register(Scale)
|
||||||
class ScaleAdmin(admin.ModelAdmin):
|
class ScaleAdmin(admin.ModelAdmin):
|
||||||
list_display = ("scale", "ratio", "gauge", "track")
|
list_display = ("scale", "ratio", "gauge", "tracks")
|
||||||
list_filter = ("ratio", "gauge", "track")
|
list_filter = ("ratio", "gauge", "tracks")
|
||||||
search_fields = list_display
|
search_fields = list_display
|
||||||
|
|
||||||
|
|
||||||
|
18
ram/metadata/migrations/0007_rename_track_scale_tracks.py
Normal file
18
ram/metadata/migrations/0007_rename_track_scale_tracks.py
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# Generated by Django 4.0.6 on 2022-07-18 21:44
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('metadata', '0006_scale_gauge'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.RenameField(
|
||||||
|
model_name='scale',
|
||||||
|
old_name='track',
|
||||||
|
new_name='tracks',
|
||||||
|
),
|
||||||
|
]
|
@@ -85,7 +85,7 @@ class Scale(models.Model):
|
|||||||
scale = models.CharField(max_length=32, unique=True)
|
scale = models.CharField(max_length=32, unique=True)
|
||||||
ratio = models.CharField(max_length=16, blank=True)
|
ratio = models.CharField(max_length=16, blank=True)
|
||||||
gauge = models.CharField(max_length=16, blank=True)
|
gauge = models.CharField(max_length=16, blank=True)
|
||||||
track = models.CharField(max_length=16, blank=True)
|
tracks = models.CharField(max_length=16, blank=True)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
ordering = ["scale"]
|
ordering = ["scale"]
|
||||||
|
@@ -29,6 +29,10 @@
|
|||||||
<th width="35%" scope="row">Gauge</th>
|
<th width="35%" scope="row">Gauge</th>
|
||||||
<td>{{ s.gauge }}</td>
|
<td>{{ s.gauge }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th width="35%" scope="row">Tracks</th>
|
||||||
|
<td>{{ s.tracks }}</td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<div class="btn-group mb-4">
|
<div class="btn-group mb-4">
|
||||||
|
Reference in New Issue
Block a user