Skip to content

Commit

Permalink
Updated object_repr to be encrypted as well.
Browse files Browse the repository at this point in the history
  • Loading branch information
HealperRasmus committed Oct 27, 2020
1 parent 3a84575 commit 12389b6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
14 changes: 10 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,18 @@
encrypted-django-reversion
==========================

This is a forked version of https://github.com/etianen/django-reversion version 3.0.8
This is a forked version of https://github.com/etianen/django-reversion

It provides a super simple modification to the Version model changing the serialized_data field from a
TextField into a EncryptedTextField.
If you are using encrypted value for your models while using django-reversion the effect will be negated
since anyone can read the json representation of the object from reversion.
This package fixes this problem.
It provides a super simple modification to the reversion.Version model changing the field type of:

- serialized_data
- object_repr

from a TextField into a EncryptedTextField (from django-searchable-encrypted-fields).

This package requires

Requirements
============
Expand Down
2 changes: 1 addition & 1 deletion reversion/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def _model(self):
help_text="The serialized form of this version of the model.",
)

object_repr = models.TextField(
object_repr = EncryptedTextField(
help_text="A string representation of the object.",
)

Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ def read(filepath):
install_requires=[
"django>=1.11",
"django-searchable-encrypted-fields>=0.1",

],
python_requires='>=3.6',
classifiers=[
Expand Down

0 comments on commit 12389b6

Please sign in to comment.