X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/d527b63f5320d32e5c598354fd60ebc00d88d7bb..7cea6dff2ec8773528706b099fb7d3acd6b9b191:/src/club/admin.py diff --git a/src/club/admin.py b/src/club/admin.py index b0c20c2c5..24884f160 100644 --- a/src/club/admin.py +++ b/src/club/admin.py @@ -9,10 +9,7 @@ from modeltranslation.admin import TranslationAdmin from . import models -class PlanAdmin(admin.ModelAdmin): - list_display = ['min_amount', 'interval'] - -admin.site.register(models.Plan, PlanAdmin) +admin.site.register(models.Club) class PayUOrderInline(admin.TabularInline): @@ -41,8 +38,8 @@ class PayUCardTokenInline(admin.TabularInline): class ScheduleAdmin(admin.ModelAdmin): - list_display = ['email', 'started_at', 'payed_at', 'expires_at', 'plan', 'amount', 'is_cancelled'] - list_search = ['email'] + list_display = ['email', 'started_at', 'payed_at', 'expires_at', 'amount', 'monthly', 'yearly', 'is_cancelled'] + search_fields = ['email'] list_filter = ['is_cancelled'] date_hierarchy = 'started_at' raw_id_fields = ['membership'] @@ -53,7 +50,7 @@ admin.site.register(models.Schedule, ScheduleAdmin) class ScheduleInline(admin.TabularInline): model = models.Schedule - fields = ['email', 'plan', 'amount', 'method', 'is_cancelled', 'started_at', 'payed_at', 'expires_at', 'email_sent'] + fields = ['email', 'amount', 'is_cancelled', 'started_at', 'payed_at', 'expires_at', 'email_sent'] readonly_fields = fields extra = 0 show_change_link = True @@ -116,3 +113,6 @@ class PayUOrderAdmin(admin.ModelAdmin): admin.site.register(models.PayUOrder, PayUOrderAdmin) + + +admin.site.register(models.Ambassador)