mirror of
https://github.com/daniviga/django-ram.git
synced 2025-08-04 13:17:50 +02:00
34 lines
859 B
Python
34 lines
859 B
Python
from django.contrib import admin
|
|
from metadata.models import (
|
|
Decoder, Manufacturer, Company, Tag, RollingStockType)
|
|
|
|
|
|
@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)
|
|
class ManufacturerAdmin(admin.ModelAdmin):
|
|
readonly_fields = ('logo_thumbnail',)
|
|
|
|
|
|
@admin.register(Tag)
|
|
class TagAdmin(admin.ModelAdmin):
|
|
readonly_fields = ('slug',)
|
|
|
|
|
|
@admin.register(RollingStockType)
|
|
class RollingStockTypeAdmin(admin.ModelAdmin):
|
|
list_display = ('type', 'category')
|
|
list_filter = list_display
|