00af109e2f
* add flake8 to pre-commit config, and fixup many things to make flake8 happy * add isort and sort all imports, add to pre-commit and requirements
15 lines
328 B
Python
15 lines
328 B
Python
from django.contrib import admin
|
|
|
|
from .models import Product, ProductCategory
|
|
|
|
|
|
@admin.register(ProductCategory)
|
|
class ProductCategoryAdmin(admin.ModelAdmin):
|
|
pass
|
|
|
|
|
|
@admin.register(Product)
|
|
class ProductAdmin(admin.ModelAdmin):
|
|
list_display = ["name", "price", "category", "in_stock"]
|
|
list_editable = ["in_stock"]
|