Lorian requested save_as feature in admin interface.
[htsworkflow.git] / htsworkflow / frontend / inventory / admin.py
index 4e171773943ead580342a8dc7fb9c14db569d281..00e79fb9d2ba265f05f2ca2370ca00edf6833a6f 100644 (file)
@@ -1,15 +1,18 @@
 from django.contrib import admin
 
-from htsworkflow.frontend.inventory.models import Item, ItemInfo, ItemType, Vendor, Location, LongTermStorage, ItemStatus
+from htsworkflow.frontend.inventory.models import Item, ItemInfo, ItemType, Vendor, Location, LongTermStorage, ItemStatus, ReagentFlowcell, ReagentLibrary
 
 class ItemAdmin(admin.ModelAdmin):
+    save_as = True
+    save_on_top = True
     list_display = ('uuid', 'barcode_id','item_type', 'item_info', 'location', 'force_use_uuid', 'creation_date')
     list_filter = (
         'item_type',
     )
 
 class ItemInfoAdmin(admin.ModelAdmin):
-    pass
+    save_as = True
+    save_on_top = True
 
 class ItemTypeAdmin(admin.ModelAdmin):
     pass
@@ -26,6 +29,12 @@ class LongTermStorageAdmin(admin.ModelAdmin):
 class ItemStatusAdmin(admin.ModelAdmin):
     pass
 
+class ReagentFlowcellAdmin(admin.ModelAdmin):
+    pass
+
+class ReagentLibraryAdmin(admin.ModelAdmin):
+    pass
+
 admin.site.register(Item, ItemAdmin)
 admin.site.register(ItemInfo, ItemInfoAdmin)
 admin.site.register(ItemType, ItemTypeAdmin)
@@ -33,3 +42,6 @@ admin.site.register(Vendor, VendorAdmin)
 admin.site.register(Location, LocationAdmin)
 admin.site.register(LongTermStorage, LongTermStorageAdmin)
 admin.site.register(ItemStatus, ItemStatusAdmin)
+admin.site.register(ReagentFlowcell, ReagentFlowcellAdmin)
+admin.site.register(ReagentLibrary, ReagentLibraryAdmin)
+