mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-21 15:32:14 +00:00
Add 'CableTypes' (#406)
* Move relevant fields and create migration to autogen cable types * CRUD and ordering * FIX: Prevent creating duplicate cable types * FIX: pep8/remove debug print * FIX: Meta migrations... :> * FIX: Update tests to match new UX * Move cabletype menu links into 'Assets' dropdown * Fix migration * Specify version of reportlab Should fix CI - looks like I went a bit too ham-handed in my requirements.txt purge last time...
This commit is contained in:
@@ -23,10 +23,15 @@ class SupplierAdmin(admin.ModelAdmin):
|
||||
@admin.register(assets.Asset)
|
||||
class AssetAdmin(admin.ModelAdmin):
|
||||
list_display = ['id', 'asset_id', 'description', 'category', 'status']
|
||||
list_filter = ['is_cable', 'category']
|
||||
list_filter = ['is_cable', 'category', 'status']
|
||||
search_fields = ['id', 'asset_id', 'description']
|
||||
|
||||
|
||||
@admin.register(assets.CableType)
|
||||
class CableTypeAdmin(admin.ModelAdmin):
|
||||
list_display = ['id', '__str__', 'plug', 'socket', 'cores', 'circuits']
|
||||
|
||||
|
||||
@admin.register(assets.Connector)
|
||||
class ConnectorAdmin(admin.ModelAdmin):
|
||||
list_display = ['id', '__str__', 'current_rating', 'voltage_rating', 'num_pins']
|
||||
|
||||
Reference in New Issue
Block a user