Django 6 + DRF resource server against the Gooyal accounts OAuth2 service, matching the Winsoo ecosystem's conventions. Covers locations, stores, catalog, cart, checkout/orders (with the multi-store-cart split and the status stepper), reviews, and notifications, plus a demo-data seed command. Payment integration (wallet debits, online gateway, seller payouts) is intentionally left out here — see feature/payment. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
17 lines
532 B
Python
17 lines
532 B
Python
from django.contrib import admin
|
|
|
|
from .models import Product, ProductCategory
|
|
|
|
|
|
@admin.register(ProductCategory)
|
|
class ProductCategoryAdmin(admin.ModelAdmin):
|
|
list_display = ('name', 'parent', 'order')
|
|
list_filter = ('parent',)
|
|
search_fields = ('name',)
|
|
|
|
|
|
@admin.register(Product)
|
|
class ProductAdmin(admin.ModelAdmin):
|
|
list_display = ('name', 'store', 'category', 'price', 'stock_quantity', 'is_active', 'sold_count')
|
|
list_filter = ('is_active', 'category', 'store')
|
|
search_fields = ('name', 'store__name')
|