-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Added requirement for UserAdmin.search_fields to 3.10 release notes. #6811
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
||
**Note**: If you're using a custom user model, ensure your user admin | ||
declared the `search_fields` property, in order to work with `TokenAdmin` | ||
autocomplete fields. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be helpful to mention the (admin.E040) so the error code is searchable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the documentation approach makes sense, as this should only affect projects that define a custom user model/admin that doesn't set |
Of course, the other option is to just revert #6762 and let users modify the admin when there is a sufficiently large number of users in their database. |
I think we should probably prefer #6817 - given that Django docs heavily nudge folks towards custom user models it's likely that the change in behavior would affect a significant number of upgrades, and I don't think it's a clear enough improvement for us to do that. Let's help folks in the right direction for customizing the TokenAuth admin themselves instead. |
OK, if you prefer. Seems a bit of a shame but... |
I'm not super wild about either option TBH. |
Closes #6808.