17 lines
374 B
Python
17 lines
374 B
Python
|
from django.contrib import admin
|
||
|
from .models import Equipment, EquipmentRemark
|
||
|
|
||
|
|
||
|
class EquipmentRemarkExtraInline(admin.TabularInline):
|
||
|
model = EquipmentRemark
|
||
|
extra = 0
|
||
|
|
||
|
|
||
|
class EquipmentAdmin(admin.ModelAdmin):
|
||
|
list_display = ['name', 'stock']
|
||
|
ordering = ['name']
|
||
|
inlines = [EquipmentRemarkExtraInline]
|
||
|
|
||
|
|
||
|
admin.site.register(Equipment, EquipmentAdmin)
|