- rag: MATH_4 / MATH_5 textbooks (TOC and page offsets read from the PDFs) - content: grades 4 and 5 in the seed files: 7 units / 28 nodes each, 204 + 194 questions (every node >= 4), all re-solved blind once - subscription: Plan.bazaar_sku (admin); POST /api/subscription/purchase accepts paymentMethod=bazaar for packs, rejects unknown methods (was ignored) - payment: idempotency key cannot switch provider; discount codes refused on Bazaar orders (Bazaar charges the fixed SKU price) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
17 lines
528 B
Python
17 lines
528 B
Python
from django.contrib import admin
|
|
|
|
from .models import Plan, Subscription
|
|
|
|
|
|
@admin.register(Plan)
|
|
class PlanAdmin(admin.ModelAdmin):
|
|
list_display = ('id', 'title', 'price', 'currency', 'duration_days', 'ai_daily_quota', 'discount_percent', 'popular',
|
|
'bazaar_sku')
|
|
list_editable = ('ai_daily_quota',)
|
|
|
|
|
|
@admin.register(Subscription)
|
|
class SubscriptionAdmin(admin.ModelAdmin):
|
|
list_display = ('id', 'user_id', 'plan', 'status', 'started_at', 'expires_at', 'order_id')
|
|
list_filter = ('status',)
|