diff --git a/README.rst b/README.rst index 1073917f..7d37cc1f 100644 --- a/README.rst +++ b/README.rst @@ -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 ============ diff --git a/reversion/models.py b/reversion/models.py index 866788b5..f9e61a56 100644 --- a/reversion/models.py +++ b/reversion/models.py @@ -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.", ) diff --git a/setup.py b/setup.py index e2a84b6d..4ccb7184 100644 --- a/setup.py +++ b/setup.py @@ -37,7 +37,6 @@ def read(filepath): install_requires=[ "django>=1.11", "django-searchable-encrypted-fields>=0.1", - ], python_requires='>=3.6', classifiers=[