2017-08-26 01:48:02 +00:00
|
|
|
from django.contrib import admin
|
2020-02-12 12:10:41 +00:00
|
|
|
|
|
|
|
from .models import Product, ProductCategory
|
2017-08-26 01:48:02 +00:00
|
|
|
|
|
|
|
|
|
|
|
@admin.register(ProductCategory)
|
|
|
|
class ProductCategoryAdmin(admin.ModelAdmin):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
@admin.register(Product)
|
|
|
|
class ProductAdmin(admin.ModelAdmin):
|
2019-06-16 12:32:24 +00:00
|
|
|
list_display = ["name", "price", "category", "in_stock"]
|
|
|
|
list_editable = ["in_stock"]
|