georgemarshall / django-cryptography

Easily encrypt data in Django
https://django-cryptography.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
382 stars 75 forks source link

django 2.0 python3.5 #9

Closed hequan2017 closed 6 years ago

hequan2017 commented 6 years ago

[root@111 autoops]# python manage.py makemigrations Traceback (most recent call last): File "manage.py", line 22, in execute_from_command_line(sys.argv) File "/usr/local/python3/lib/python3.5/site-packages/django/core/management/init.py", line 371, in execute_from_command_line utility.execute() File "/usr/local/python3/lib/python3.5/site-packages/django/core/management/init.py", line 365, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/usr/local/python3/lib/python3.5/site-packages/django/core/management/base.py", line 288, in run_from_argv self.execute(*args, cmd_options) File "/usr/local/python3/lib/python3.5/site-packages/django/core/management/base.py", line 332, in execute self.check() File "/usr/local/python3/lib/python3.5/site-packages/django/core/management/base.py", line 364, in check include_deployment_checks=include_deployment_checks, File "/usr/local/python3/lib/python3.5/site-packages/django/core/management/base.py", line 351, in _run_checks return checks.run_checks(kwargs) File "/usr/local/python3/lib/python3.5/site-packages/django/core/checks/registry.py", line 73, in run_checks new_errors = check(app_configs=app_configs) File "/usr/local/python3/lib/python3.5/site-packages/django/core/checks/model_checks.py", line 27, in check_all_models errors.extend(model.check(kwargs)) File "/usr/local/python3/lib/python3.5/site-packages/django/db/models/base.py", line 1200, in check errors.extend(cls._check_fields(kwargs)) File "/usr/local/python3/lib/python3.5/site-packages/django/db/models/base.py", line 1272, in _check_fields errors.extend(field.check(**kwargs)) File "/usr/local/python3/lib/python3.5/site-packages/django_cryptography/fields.py", line 130, in check if getattr(self, 'remote_field', self.rel): AttributeError: 'EncryptedCharField' object has no attribute 'rel'

georgemarshall commented 6 years ago

This issue was fixed in the 0.3 release, I can only assume you are using 0.2.

https://github.com/georgemarshall/django-cryptography/blob/stable/0.3.x/django_cryptography/fields.py#L128