Changed import path for settings_local.py to work with absolute_import under Py2, and also under Py3.

- Legacy-Id: 16506
This commit is contained in:
Henrik Levkowetz 2019-07-17 13:42:36 +00:00
parent 6ef24e9c4e
commit 820539e822
2 changed files with 2 additions and 2 deletions

View file

@ -400,7 +400,7 @@ def maybe_patch_library(app_configs, **kwargs):
@checks.register('security')
def check_api_key_in_local_settings(app_configs, **kwargs):
errors = []
import settings_local
import ietf.settings_local
if settings.SERVER_MODE == 'production':
if not ( hasattr(settings_local, 'API_PUBLIC_KEY_PEM')
and hasattr(settings_local, 'API_PRIVATE_KEY_PEM')):

View file

@ -1059,7 +1059,7 @@ qvNU+qRWi+YXrITsgn92/gVxX5AoK0n+s5Lx7fpjxkARVi66SF6zTJnX
# Put the production SECRET_KEY in settings_local.py, and also any other
# sensitive or site-specific changes. DO NOT commit settings_local.py to svn.
from settings_local import * # pyflakes:ignore pylint: disable=wildcard-import
from ietf.settings_local import * # pyflakes:ignore pylint: disable=wildcard-import
for app in INSTALLED_APPS:
if app.startswith('ietf'):