Encrypting the models are good, but after the encryption, if I want to get the data by the id of the row i get the exception error like mentioned above.
My Modal
from fernet_fields import EncryptedCharField
class MyModal(models.Model):
name = EncryptedCharField(max_length=50, default='')
My code
from app.models import MyModal
def get_details(request):
data_id = request.GET.get('id')
data = MyModal.objects.filter(id=data_id)
print data
return HttpResponse('Success')
Hello,
Encrypting the models are good, but after the encryption, if I want to get the data by the id of the row i get the exception error like mentioned above. My Modal
My code