Skip to content

Commit 99d24c8

Browse files
committed
Tighten up the model example and add a warning about querying against encrypted data.
1 parent 4fc9d15 commit 99d24c8

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

README.md

+4-9
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,14 @@ In your `settings.py`
2424

2525
Then, in `models.py`
2626

27-
from encrypted_fields import (
28-
EncryptedCharField,
29-
EncryptedTextField,
30-
EncryptedDateTimeField,
31-
EncryptedIntegerField,
32-
)
27+
from encrypted_fields import EncryptedTextField
3328

3429
class MyModel(models.Model):
35-
char_field = EncryptedCharField(max_length=255)
3630
text_field = EncryptedTextField()
37-
datetime_field = EncryptedDateTimeField()
38-
integer_field = EncryptedIntegerField()
3931

32+
Use your model as normal and your data will be encrypted in the database.
33+
34+
_Warning:_ Once the data is encrypted, it can no longer to used to query or sort. In SQL, these will all look like text fields with random noise in them (which is what you want).
4035

4136
#### Available Fields
4237

0 commit comments

Comments
 (0)