bornhack-website/src/bar/admin.py
2018-03-04 16:00:30 +01:00

14 lines
327 B
Python

from django.contrib import admin
from .models import ProductCategory, Product
@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']