Skip to content

Commit

Permalink
Add customizable environment variable setting prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
murhum1 authored and markkuriekkinen committed Aug 27, 2021
1 parent 6d6baff commit 0a00734
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion aplus/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,8 +431,11 @@
update_settings_with_file(__name__,
environ.get('APLUS_LOCAL_SETTINGS', 'local_settings'),
quiet='APLUS_LOCAL_SETTINGS' in environ)

update_settings_from_environment(__name__, 'DJANGO_') # FIXME: deprecated. was used with containers before, so keep it here for now.
update_settings_from_environment(__name__, 'APLUS_')
# Load settings from environment variables starting with ENV_SETTINGS_PREFIX (default APLUS_)
ENV_SETTINGS_PREFIX = environ.get('ENV_SETTINGS_PREFIX', 'APLUS_')
update_settings_from_environment(__name__, ENV_SETTINGS_PREFIX)
update_secret_from_file(__name__, environ.get('APLUS_SECRET_KEY_FILE', 'secret_key'))

# Complain if BASE_URL is not set
Expand Down

0 comments on commit 0a00734

Please sign in to comment.