|
@@ -13,10 +13,10 @@ admin.site.register(ItemType)
|
|
|
|
|
|
@admin.register(Item)
|
|
@admin.register(Item)
|
|
class ItemAdmin(admin.ModelAdmin):
|
|
class ItemAdmin(admin.ModelAdmin):
|
|
- list_display = ('designation', 'type', 'mac_address', 'user_in_charge',
|
|
|
|
|
|
+ list_display = ('designation', 'type', 'mac_address', 'owner',
|
|
'buy_date', 'is_available')
|
|
'buy_date', 'is_available')
|
|
- list_filter = ('type__name', 'buy_date')
|
|
|
|
- search_fields = ('designation', 'user_in_charge')
|
|
|
|
|
|
+ list_filter = ('type__name', 'buy_date', 'owner')
|
|
|
|
+ search_fields = ('designation', 'owner')
|
|
actions = ['give_back']
|
|
actions = ['give_back']
|
|
|
|
|
|
def give_back(self, request, queryset):
|
|
def give_back(self, request, queryset):
|