|
@@ -17,7 +17,10 @@ class ItemAdmin(admin.ModelAdmin):
|
|
|
'designation', 'type', 'mac_address', 'serial', 'owner',
|
|
|
'buy_date', 'is_available')
|
|
|
list_filter = ('type__name', 'buy_date', 'owner')
|
|
|
- search_fields = ('designation', 'owner')
|
|
|
+ search_fields = (
|
|
|
+ 'designation', 'mac_address', 'serial',
|
|
|
+ 'owner__email', 'owner__nickname',
|
|
|
+ 'owner__first_name', 'owner__last_name')
|
|
|
actions = ['give_back']
|
|
|
|
|
|
def give_back(self, request, queryset):
|