25 lines
638 B
Python
25 lines
638 B
Python
from django.contrib import admin
|
|
|
|
from . import models
|
|
from . import forms
|
|
|
|
# Register your models here.
|
|
|
|
class ProductAdmin(admin.ModelAdmin):
|
|
form = forms.ProductTagForm
|
|
list_display = ('name', 'category', 'sourcing_date', 'company')
|
|
list_filter = ('company', 'tags', 'category', 'attributes')
|
|
search_fields = ('name', 'sku', 'description')
|
|
|
|
|
|
'''
|
|
class ProductInline(admin.TabularInline):
|
|
model = models.Product
|
|
form = forms.ProductTagForm
|
|
'''
|
|
|
|
admin.site.register(models.Product, ProductAdmin)
|
|
admin.site.register(models.TreeTag)
|
|
admin.site.register(models.CategoryTag)
|
|
admin.site.register(models.AttributeTag)
|