Reputation: 25577
I have a model with an encrypted field.
So fields are encrypted and decrypted as they enter and leave the database.
within the admin panel
?q='item' does not seem to find any rows
?field_name='item' does find them all!!
Any ideas? :)
Upvotes: 0
Views: 948
Reputation: 50796
If I understand your question correctly you would have to encrypt the search term as well to fit to the entries in the database. This will most probably fail with the standard admin functionality, since all the fields specified as search fields will be handled in the same fashion. You would have to create your own ChangeList
class and override its get_query_set
method, so that it can handle your field in a special way!
Upvotes: 1