We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4513459 commit 45d9efcCopy full SHA for 45d9efc
oauth2_provider/admin.py
@@ -25,6 +25,7 @@ class ApplicationAdmin(admin.ModelAdmin):
25
"client_type": admin.HORIZONTAL,
26
"authorization_grant_type": admin.VERTICAL,
27
}
28
+ search_fields = ("name",) + (("user__email",) if has_email else ())
29
raw_id_fields = ("user",)
30
31
@@ -39,12 +40,13 @@ class AccessTokenAdmin(admin.ModelAdmin):
39
40
class GrantAdmin(admin.ModelAdmin):
41
list_display = ("code", "application", "user", "expires")
42
43
+ search_fields = ("code",) + (("user__email",) if has_email else ())
44
45
46
class IDTokenAdmin(admin.ModelAdmin):
47
list_display = ("jti", "user", "application", "expires")
48
- search_fields = ("token",) + (("user__email",) if has_email else ())
49
+ search_fields = ("user__email",) if has_email else ()
50
list_filter = ("application",)
51
52
0 commit comments