You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-9
Original file line number
Diff line number
Diff line change
@@ -24,19 +24,14 @@ In your `settings.py`
24
24
25
25
Then, in `models.py`
26
26
27
-
from encrypted_fields import (
28
-
EncryptedCharField,
29
-
EncryptedTextField,
30
-
EncryptedDateTimeField,
31
-
EncryptedIntegerField,
32
-
)
27
+
from encrypted_fields import EncryptedTextField
33
28
34
29
class MyModel(models.Model):
35
-
char_field = EncryptedCharField(max_length=255)
36
30
text_field = EncryptedTextField()
37
-
datetime_field = EncryptedDateTimeField()
38
-
integer_field = EncryptedIntegerField()
39
31
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).
0 commit comments