projects
/
pgweb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c0e8e71
)
Allow /admin/ to search for users by secondary email
author
Magnus Hagander
<magnus@hagander.net>
Fri, 29 Jan 2021 11:27:29 +0000
(12:27 +0100)
committer
Magnus Hagander
<magnus@hagander.net>
Fri, 29 Jan 2021 11:27:42 +0000
(12:27 +0100)
pgweb/account/admin.py
patch
|
blob
|
blame
|
history
diff --git
a/pgweb/account/admin.py
b/pgweb/account/admin.py
index 93d73fed0945bba7b46cd98af8052944eaa2fca4..90076f71a9bca3fb125d9f8b10e0364361fad59d 100644
(file)
--- a/
pgweb/account/admin.py
+++ b/
pgweb/account/admin.py
@@
-129,6
+129,11
@@
class PGUserAdmin(UserAdmin):
fs[1][1]['fields'] = list(fs[1][1]['fields']) + ['extraemail', ]
return fs
+ @property
+ def search_fields(self):
+ sf = list(super().search_fields)
+ return sf + ['secondaryemail__email', ]
+
admin.site.register(CommunityAuthSite, CommunityAuthSiteAdmin)
admin.site.register(CommunityAuthOrg)