mirror of
https://github.com/lemeow125/Borrowing-TrackerBackend.git
synced 2024-11-17 06:19:26 +08:00
16 lines
572 B
Python
16 lines
572 B
Python
from django.contrib import admin
|
|
from simple_history.admin import SimpleHistoryAdmin
|
|
from .models import Equipment, EquipmentInstance
|
|
|
|
|
|
@admin.register(Equipment)
|
|
class EquipmentAdmin(SimpleHistoryAdmin):
|
|
readonly_fields = ('date_added', 'last_updated')
|
|
list_display = ('id', 'name', 'date_added', 'last_updated')
|
|
|
|
|
|
@admin.register(EquipmentInstance)
|
|
class EquipmentInstanceAdmin(SimpleHistoryAdmin):
|
|
readonly_fields = ('date_added', 'last_updated')
|
|
list_display = ('id', 'equipment', 'status', 'remarks',
|
|
'date_added', 'last_updated')
|