Files
mayan-edms/mayan/apps/django_gpg/settings.py
Roberto Rosario d6435b7735 Django GPG: 3rd party app compatibility update
Update the django_gpg app to work with the latest version of the
python-gnupg package (0.4.3).

The python-gnupg now returns a more clear error message to
differentiate between a bad passphrase and a missing passphrase.
This improments allows the django_gpg to simplify its error
message parsing and remove the literals:
"ERROR_MSG_NEED_PASSPHRASE" and "ERROR_MSG_GOOD_PASSPHRASE".

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-06 02:58:40 -04:00

29 lines
908 B
Python

from __future__ import unicode_literals
from django.utils.translation import ugettext_lazy as _
from mayan.apps.smart_settings import Namespace
from .literals import DEFAULT_GPG_PATH, DEFAULT_SETTING_GPG_BACKEND
namespace = Namespace(name='django_gpg', label=_('Signatures'))
setting_gpg_backend = namespace.add_setting(
default=DEFAULT_SETTING_GPG_BACKEND,
global_name='SIGNATURES_GPG_BACKEND', help_text=_(
'Path to the GPG class to use when managing keys.'
)
)
setting_gpg_backend_arguments = namespace.add_setting(
global_name='SIGNATURES_GPG_BACKEND_ARGUMENTS',
default={
'gpg_path': DEFAULT_GPG_PATH
}, help_text=_(
'Arguments to pass to the SIGNATURES_GPG_BACKEND. '
)
)
setting_keyserver = namespace.add_setting(
global_name='SIGNATURES_KEYSERVER', default='pool.sks-keyservers.net',
help_text=_('Keyserver used to query for keys.')
)