File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,9 +39,29 @@ class DiscountContractAttachmentRedemptionAdmin(ReadOnlyModelAdmin):
3939 """Admin for discount attachments."""
4040
4141 list_display = ["user" , "contract" , "discount" , "created_on" ]
42+ list_filter = [
43+ (
44+ "user" ,
45+ admin .RelatedOnlyFieldListFilter ,
46+ ),
47+ (
48+ "contract" ,
49+ admin .RelatedOnlyFieldListFilter ,
50+ ),
51+ (
52+ "user__user_organizations__organization" ,
53+ admin .RelatedOnlyFieldListFilter ,
54+ ),
55+ ]
4256 date_hierarchy = "created_on"
4357 fields = ["user" , "contract" , "discount" , "created_on" ]
4458 readonly_fields = ["user" , "contract" , "discount" , "created_on" ]
59+ search_fields = [
60+ "user__email" ,
61+ "user__global_id" ,
62+ "contract__slug" ,
63+ "discount__discount_code" ,
64+ ]
4565
4666
4767class ContractPageProgramInline (admin .TabularInline ):
You can’t perform that action at this time.
0 commit comments