mirror of
https://github.com/lemeow125/EquipmentTracker-Backend.git
synced 2024-11-17 06:09:26 +08:00
Fix admin panel fields causing crashes
This commit is contained in:
parent
b4d177f8c3
commit
8a38392534
2 changed files with 6 additions and 8 deletions
|
@ -5,7 +5,5 @@ from simple_history.admin import SimpleHistoryAdmin
|
|||
|
||||
@admin.register(EquipmentGroup)
|
||||
class EquipmentGroupAdmin(SimpleHistoryAdmin):
|
||||
readonly_fields = ['status', 'dated_added',
|
||||
'last_updated', 'last_updated_by']
|
||||
list_display = ('name', 'status', 'date_added',
|
||||
'last_updated', 'last_updated_by')
|
||||
readonly_fields = ['status', 'date_added', 'last_updated']
|
||||
list_display = ('name', 'status', 'date_added', 'last_updated')
|
||||
|
|
|
@ -5,12 +5,12 @@ from .models import Equipment, EquipmentInstance
|
|||
|
||||
@admin.register(Equipment)
|
||||
class EquipmentAdmin(SimpleHistoryAdmin):
|
||||
readonly_fields = ('date_added', 'last_updated', 'last_updated_by')
|
||||
list_display = ('name', 'date_added', 'last_updated', 'last_updated_by')
|
||||
readonly_fields = ('date_added', 'last_updated')
|
||||
list_display = ('name', 'date_added', 'last_updated')
|
||||
|
||||
|
||||
@admin.register(EquipmentInstance)
|
||||
class EquipmentInstanceAdmin(SimpleHistoryAdmin):
|
||||
readonly_fields = ('date_added', 'last_updated', 'last_updated_by')
|
||||
readonly_fields = ('date_added', 'last_updated')
|
||||
list_display = ('equipment', 'status', 'remarks',
|
||||
'date_added', 'last_updated', 'last_updated_by')
|
||||
'date_added', 'last_updated')
|
||||
|
|
Loading…
Reference in a new issue