admin search fields
This commit is contained in:
parent
14728c8513
commit
6e993c0e27
1 changed files with 4 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue