mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Add part attachments to the admin interface
This commit is contained in:
parent
d315b7c1d0
commit
00199c26de
@ -2,10 +2,10 @@ from django.contrib import admin
|
||||
from import_export.admin import ImportExportModelAdmin
|
||||
|
||||
from .models import PartCategory, Part
|
||||
from .models import PartAttachment
|
||||
from .models import SupplierPart
|
||||
from .models import BomItem
|
||||
|
||||
|
||||
class PartAdmin(ImportExportModelAdmin):
|
||||
|
||||
list_display = ('name', 'IPN', 'description', 'total_stock', 'category')
|
||||
@ -16,6 +16,11 @@ class PartCategoryAdmin(admin.ModelAdmin):
|
||||
list_display = ('name', 'pathstring', 'description')
|
||||
|
||||
|
||||
class PartAttachmentAdmin(admin.ModelAdmin):
|
||||
|
||||
list_display = ('part', 'attachment')
|
||||
|
||||
|
||||
class BomItemAdmin(ImportExportModelAdmin):
|
||||
list_display = ('part', 'sub_part', 'quantity')
|
||||
|
||||
@ -35,5 +40,6 @@ class ParameterAdmin(admin.ModelAdmin):
|
||||
|
||||
admin.site.register(Part, PartAdmin)
|
||||
admin.site.register(PartCategory, PartCategoryAdmin)
|
||||
admin.site.register(PartAttachment, PartAttachmentAdmin)
|
||||
admin.site.register(BomItem, BomItemAdmin)
|
||||
admin.site.register(SupplierPart, SupplierPartAdmin)
|
||||
|
Loading…
Reference in New Issue
Block a user