You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our app has ~50k User objects and even more Client objects, and currently, because of AuthTokenAdmin's list_filter, our app times out every time we access the AuthToken list page in Django admin (because the filter lists every single one of these User and Client objects as possible filters). Can AuthTokenAdmin's list_filter be removed?
The text was updated successfully, but these errors were encountered:
sunweiyang
changed the title
AuthTokenAdmin list_filter is causing performance problems
AuthTokenAdmin list_filter is causing performance problems (mostly timeouts)
Jun 17, 2022
You make a solid point and ideally it should not have been there but I don't know how soon I'll be able to ship a new release with this change. Meanwhile, you should easily be able to override the AuthTokenAdmin class and customize it as per your need, like so:
fromdurin.adminimportAuthTokenAdminfromdurin.modelsimportAuthTokenclassCustomAuthTokenAdmin(AuthTokenAdmin):
list_filter= []
# Unregister the default admin view for AuthTokenadmin.site.unregister(AuthToken)
# Register our custom admin view for AuthTokenadmin.site.register(AuthToken, CustomAuthTokenAdmin)
Our app has ~50k User objects and even more Client objects, and currently, because of AuthTokenAdmin's list_filter, our app times out every time we access the AuthToken list page in Django admin (because the filter lists every single one of these User and Client objects as possible filters). Can AuthTokenAdmin's list_filter be removed?
The text was updated successfully, but these errors were encountered: