mirror of
https://github.com/daniviga/django-ram.git
synced 2025-08-04 21:27:49 +02:00
Minor admin improvements
This commit is contained in:
@@ -6,11 +6,15 @@ from metadata.models import (
|
||||
@admin.register(Decoder)
|
||||
class DecoderAdmin(admin.ModelAdmin):
|
||||
readonly_fields = ('image_thumbnail',)
|
||||
list_display = ('__str__', 'interface')
|
||||
list_filter = ('manufacturer', 'interface')
|
||||
|
||||
|
||||
@admin.register(Company)
|
||||
class CompanyAdmin(admin.ModelAdmin):
|
||||
readonly_fields = ('logo_thumbnail',)
|
||||
list_display = ('name', 'country')
|
||||
list_filter = list_display
|
||||
|
||||
|
||||
@admin.register(Manufacturer)
|
||||
|
18
dcc/roster/migrations/0002_alter_rollingstock_address.py
Normal file
18
dcc/roster/migrations/0002_alter_rollingstock_address.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 4.0.2 on 2022-04-01 20:32
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('roster', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='rollingstock',
|
||||
name='address',
|
||||
field=models.SmallIntegerField(blank=True, default=None, null=True),
|
||||
),
|
||||
]
|
@@ -23,7 +23,7 @@ class RollingStock(models.Model):
|
||||
Tag,
|
||||
related_name='rolling_stock',
|
||||
blank=True)
|
||||
address = models.SmallIntegerField(default=3, null=True, blank=True)
|
||||
address = models.SmallIntegerField(default=None, null=True, blank=True)
|
||||
manufacturer = models.ForeignKey(
|
||||
Manufacturer, on_delete=models.CASCADE,
|
||||
null=True, blank=True)
|
||||
|
Reference in New Issue
Block a user