admin search fields

This commit is contained in:
Qwann 2018-08-09 16:14:28 +02:00
parent 14728c8513
commit 6e993c0e27

View file

@ -63,13 +63,16 @@ class EquipmentAttributeValueInline(admin.TabularInline):
class CategoryAdmin(admin.ModelAdmin):
readonly_fields = ['full_name']
list_display = ['name', 'parent', "full_name"]
ordering = ['name', 'parent']
search_fields = ['name',]
class EquipmentAttributeAdmin(admin.ModelAdmin):
list_display = ['name']
ordering = ['name']
search_fields = ['name',]
class EquipmentAdmin(admin.ModelAdmin):
@ -80,6 +83,7 @@ class EquipmentAdmin(admin.ModelAdmin):
EquipmentDefaultExtraInline,
EquipmentLostExtraInline,
EquipmentRevisionExtraInline]
search_fields = ['name', 'description',]
admin_site.register(Equipment, EquipmentAdmin)