aboutsummaryrefslogtreecommitdiffstats
path: root/alphabetlearning/payments/admin.py
diff options
context:
space:
mode:
Diffstat (limited to 'alphabetlearning/payments/admin.py')
-rw-r--r--alphabetlearning/payments/admin.py29
1 files changed, 17 insertions, 12 deletions
diff --git a/alphabetlearning/payments/admin.py b/alphabetlearning/payments/admin.py
index 9588f3b..685af63 100644
--- a/alphabetlearning/payments/admin.py
+++ b/alphabetlearning/payments/admin.py
@@ -9,31 +9,36 @@ from .models import SubscriptionPlan
from alphabetlearning.resources.models import Resource
-#class PriceAdmin(admin.ModelAdmin):
-# list_display =
+# class PriceAdmin(admin.ModelAdmin):
+# list_display =
-#class ProductAdmin(admin.ModelAdmin):
+# class ProductAdmin(admin.ModelAdmin):
# inlines = [PriceInlineAdmin]
+
class SubscriptionPlanAdmin(admin.ModelAdmin):
- list_display = ('name', 'price', 'description', 'allowed_downloads')
+ list_display = ("name", "price", "description", "allowed_downloads")
+
+
+class CartItemAdminInline(admin.TabularInline):
+ model = CartItem
class ShoppingCartAdmin(admin.ModelAdmin):
- list_display = ('user', 'created_at', 'updated_at')
+# list_display = ("user", "created_at", "updated_at")
+ inlines = [CartItemAdminInline,]
-class CartItemAdmin(admin.ModelAdmin):
- list_display = ('cart', 'resource', 'quantity', 'added_at')
+# class CartItemAdmin(admin.ModelAdmin):
+# list_display = ('cart', 'resource', 'quantity', 'added_at')
class SubscriptionAdmin(admin.ModelAdmin):
- list_display = ('user', 'is_active', 'start_date', 'end_date')
+ list_display = ("user", "is_active", "start_date", "end_date")
-#admin.site.register(Product, ProductAdmin)
+# admin.site.register(Product, ProductAdmin)
admin.site.register(Price)
-admin.site.register(SubscriptionPlan)
-admin.site.register(ShoppingCart)
+admin.site.register(ShoppingCart, ShoppingCartAdmin)
admin.site.register(CartItem)
-admin.site.register(Subscription)
+admin.site.register(Subscription, SubscriptionAdmin)