mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
0550dad2d4
- Not yet fully working!
39 lines
1.0 KiB
Python
39 lines
1.0 KiB
Python
from django.contrib import admin
|
|
|
|
from .models import PartCategory, Part
|
|
from .models import BomItem
|
|
from .models import PartAttachment
|
|
|
|
class PartAdmin(admin.ModelAdmin):
|
|
|
|
list_display = ('name', 'IPN', 'description', 'stock', 'category')
|
|
|
|
|
|
class PartCategoryAdmin(admin.ModelAdmin):
|
|
|
|
list_display = ('name', 'pathstring', 'description')
|
|
|
|
class BomItemAdmin(admin.ModelAdmin):
|
|
list_display=('part', 'sub_part', 'quantity')
|
|
|
|
class PartAttachmentAdmin(admin.ModelAdmin):
|
|
list_display = ('part', 'attachment')
|
|
|
|
"""
|
|
class ParameterTemplateAdmin(admin.ModelAdmin):
|
|
list_display = ('name', 'units', 'format')
|
|
|
|
|
|
class ParameterAdmin(admin.ModelAdmin):
|
|
list_display = ('part', 'template', 'value')
|
|
"""
|
|
|
|
admin.site.register(Part, PartAdmin)
|
|
admin.site.register(PartCategory, PartCategoryAdmin)
|
|
admin.site.register(BomItem, BomItemAdmin)
|
|
admin.site.register(PartAttachment, PartAttachmentAdmin)
|
|
|
|
#admin.site.register(PartParameter, ParameterAdmin)
|
|
#admin.site.register(PartParameterTemplate, ParameterTemplateAdmin)
|
|
#admin.site.register(CategoryParameterLink)
|