mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
29 lines
719 B
Python
29 lines
719 B
Python
from django.contrib import admin
|
|
|
|
from .models import PartCategory, Part, PartParameter, PartParameterTemplate
|
|
|
|
|
|
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', 'category')
|
|
|
|
|
|
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)
|