Add admin interface for PartParameter

This commit is contained in:
Oliver Walters 2019-08-20 12:43:23 +10:00
parent 1cd0051316
commit 0955166fae

View File

@ -4,6 +4,7 @@ from import_export.admin import ImportExportModelAdmin
from .models import PartCategory, Part
from .models import PartAttachment, PartStar
from .models import BomItem
from .models import PartParameter
class PartAdmin(ImportExportModelAdmin):
@ -33,14 +34,15 @@ class BomItemAdmin(ImportExportModelAdmin):
"""
class ParameterTemplateAdmin(admin.ModelAdmin):
list_display = ('name', 'units', 'format')
"""
class ParameterAdmin(admin.ModelAdmin):
list_display = ('part', 'template', 'value')
"""
list_display = ('part', 'name', 'data')
admin.site.register(Part, PartAdmin)
admin.site.register(PartCategory, PartCategoryAdmin)
admin.site.register(PartAttachment, PartAttachmentAdmin)
admin.site.register(PartStar, PartStarAdmin)
admin.site.register(BomItem, BomItemAdmin)
admin.site.register(PartParameter, ParameterAdmin)