mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
30 lines
767 B
Python
30 lines
767 B
Python
from django.contrib import admin
|
|
|
|
from .models import PartCategory, Part, PartParameter, PartParameterTemplate, CategoryParameterLink
|
|
|
|
|
|
class PartAdmin(admin.ModelAdmin):
|
|
|
|
list_display = ('name', 'IPN', 'stock', 'category')
|
|
|
|
|
|
class PartCategoryAdmin(admin.ModelAdmin):
|
|
|
|
list_display = ('name', 'path', 'description')
|
|
|
|
|
|
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(PartParameter, ParameterAdmin)
|
|
admin.site.register(PartParameterTemplate, ParameterTemplateAdmin)
|
|
admin.site.register(CategoryParameterLink)
|