Django and filtering encrypted fields
I am using django-encrypted-fields to encrypt the data on my database. But I want to be able to filter them according to user's criteria e.g search a client with specific name (search term). But as I have read here and everywhere, you can't filter if you use EncryptedFields. So I was wondering is it ok to use standard for loops to iter on every db record and see if search term matches the fields of your model? eg clients = Client.objects.all() post_data = form.cleaned_data search_result = [] for client in clients: if (post_data['charfield1'].lower() in client.charfield1.lower() and post_data['
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.