Changeset View
Changeset View
Standalone View
Standalone View
looper/admin.py
| Show First 20 Lines • Show All 233 Lines • ▼ Show 20 Lines | class OrderInline(admin.TabularInline): | ||||
| min_num = 0 | min_num = 0 | ||||
| extra = 0 | extra = 0 | ||||
| show_change_link = True | show_change_link = True | ||||
| fields = [ | fields = [ | ||||
| 'status', | 'status', | ||||
| 'created_at', | 'created_at', | ||||
| 'updated_at', | 'updated_at', | ||||
| 'price', | 'price', | ||||
| 'tax_type', | |||||
| 'tax_rate', | |||||
| 'tax_country', | |||||
| 'tax', | |||||
| 'payment_method', | 'payment_method', | ||||
| 'collection_method', | 'collection_method', | ||||
| 'collection_attempts', | 'collection_attempts', | ||||
| payment_link, | payment_link, | ||||
| ] | ] | ||||
| readonly_fields = fields | readonly_fields = fields | ||||
| can_delete = False | can_delete = False | ||||
| ▲ Show 20 Lines • Show All 109 Lines • ▼ Show 20 Lines | fieldsets: List[Tuple[Any, Dict]] = [ | ||||
| ( | ( | ||||
| 'Money', | 'Money', | ||||
| { | { | ||||
| 'fields': [ | 'fields': [ | ||||
| 'payment_method', | 'payment_method', | ||||
| 'collection_method', | 'collection_method', | ||||
| 'currency', | 'currency', | ||||
| 'price', | 'price', | ||||
| # 'tax', 'tax_type', 'tax_region', | |||||
| ], | ], | ||||
| }, | }, | ||||
| ), | ), | ||||
| ( | ( | ||||
| 'Dates', | 'Dates', | ||||
| { | { | ||||
| 'fields': [ | 'fields': [ | ||||
| 'created_at', | 'created_at', | ||||
| ▲ Show 20 Lines • Show All 65 Lines • ▼ Show 20 Lines | |||||
| @admin.register(models.Order) | @admin.register(models.Order) | ||||
| class OrderAdmin(admin.ModelAdmin): | class OrderAdmin(admin.ModelAdmin): | ||||
| list_display = [ | list_display = [ | ||||
| 'id', | 'id', | ||||
| 'status', | 'status', | ||||
| 'created_at', | 'created_at', | ||||
| 'paid_at', | 'paid_at', | ||||
| 'price', | 'price', | ||||
| 'tax_type', | |||||
| 'tax_rate', | |||||
| 'tax_country', | |||||
| 'tax', | |||||
| 'vat_number', | |||||
| user_link, | user_link, | ||||
| subscription_link, | subscription_link, | ||||
| 'payment_method', | 'payment_method', | ||||
| 'collection_method', | 'collection_method', | ||||
| order_receipt_link, | order_receipt_link, | ||||
| ] | ] | ||||
| list_display_links = ['id', 'status', 'created_at', 'paid_at'] | list_display_links = ['id', 'status', 'created_at', 'paid_at'] | ||||
| list_filter = [ | list_filter = [ | ||||
| Show All 14 Lines | class OrderAdmin(admin.ModelAdmin): | ||||
| raw_id_fields = ['user'] | raw_id_fields = ['user'] | ||||
| readonly_fields = [ | readonly_fields = [ | ||||
| user_link, | user_link, | ||||
| subscription_link, | subscription_link, | ||||
| payment_link, | payment_link, | ||||
| 'created_at', | 'created_at', | ||||
| 'updated_at', | 'updated_at', | ||||
| 'collection_attempts', | 'collection_attempts', | ||||
| 'tax_type', | |||||
| 'tax_rate', | |||||
| 'tax_country', | |||||
| 'tax', | |||||
| 'vat_number', | |||||
| 'total_refunded', | 'total_refunded', | ||||
| ] | ] | ||||
| fieldsets = [ | fieldsets = [ | ||||
| ( | ( | ||||
| None, | None, | ||||
| { | { | ||||
| 'fields': [user_link, subscription_link, payment_link, 'status', 'name'], | 'fields': [user_link, subscription_link, payment_link, 'status', 'name'], | ||||
| }, | }, | ||||
| ), | ), | ||||
| ( | ( | ||||
| 'Money', | 'Money', | ||||
| { | { | ||||
| 'fields': [ | 'fields': [ | ||||
| 'payment_method', | 'payment_method', | ||||
| 'collection_method', | 'collection_method', | ||||
| 'collection_attempts', | 'collection_attempts', | ||||
| 'currency', | 'currency', | ||||
| 'price', | 'price', | ||||
| 'tax_type', | |||||
| 'tax_rate', | |||||
| 'tax_country', | |||||
| 'tax', | |||||
| 'vat_number', | |||||
| 'total_refunded', | 'total_refunded', | ||||
| # 'tax', 'tax_type', 'tax_region', | |||||
| ], | ], | ||||
| }, | }, | ||||
| ), | ), | ||||
| ( | ( | ||||
| 'Dates', | 'Dates', | ||||
| { | { | ||||
| 'fields': ['created_at', 'updated_at', 'paid_at', 'retry_after'], | 'fields': ['created_at', 'updated_at', 'paid_at', 'retry_after'], | ||||
| 'classes': ('collapse',), | 'classes': ('collapse',), | ||||
| ▲ Show 20 Lines • Show All 239 Lines • Show Last 20 Lines | |||||