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
(djangoenv) volker@debian10-django:~/django$ python manage.py migrate secure_mail
Traceback (most recent call last):
File "manage.py", line 21, in <module>
main()
File "manage.py", line 17, in main
execute_from_command_line(sys.argv)
File "/home/volker/django/djangoenv/lib/python3.7/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
utility.execute()
File "/home/volker/django/djangoenv/lib/python3.7/site-packages/django/core/management/__init__.py", line 377, in execute
django.setup()
File "/home/volker/django/djangoenv/lib/python3.7/site-packages/django/__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/volker/django/djangoenv/lib/python3.7/site-packages/django/apps/registry.py", line 91, in populate
app_config = AppConfig.create(entry)
File "/home/volker/django/djangoenv/lib/python3.7/site-packages/django/apps/config.py", line 116, in create
mod = import_module(mod_path)
File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/volker/django/djangoenv/lib/python3.7/site-packages/secure_mail/apps.py", line 4, in <module>
from .checks import (check_signing_key, check_can_import_gpg, SecureMailTags)
File "/home/volker/django/djangoenv/lib/python3.7/site-packages/secure_mail/checks.py", line 3, in <module>
from secure_mail.settings import (
File "/home/volker/django/djangoenv/lib/python3.7/site-packages/secure_mail/settings.py", line 41, in <module>
'name_real': settings.SITE_NAME,
File "/home/volker/django/djangoenv/lib/python3.7/site-packages/django/conf/__init__.py", line 77, in __getattr__
val = getattr(self._wrapped, name)
AttributeError: 'Settings' object has no attribute 'SITE_NAME'
The text was updated successfully, but these errors were encountered:
Thanks for reporting this, this is a bug. I'll see if I can fix this and push a new version to PyPI later tonight or this week.
In the meantime, the workaround is to set a SITE_NAME variable explicitly in your settings.py. Set the value to what you would like to pass to GnuPG as the name_real keyword argument. According to the GnuPG documentation that should be "The real name of the user identity which is represented by the key." I would recommend setting it to a human-readable version of you or your site/organization's name.
Just an update: I have been working on this a bit, and I have resolved this issue in a local branch. I will be pushing it to GitHub soon and pushing a release to PyPI hopefully later this week.
I have just pushed out version 1.2.0 to PyPI, which fixes this issue. Closing. If you find that the issue is not fixed, or if it gets reopened in the future (it shouldn't), comment here and I'll reopen it.
Hi there,
i installed django following these instructions: https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-debian-9
after which i tried to install django-secure-mail following your instructions.
The pip install part works fine but migrating database settings via python manage.py migrate secure_mail unfortunately throws this error message:
The text was updated successfully, but these errors were encountered: