Skip to content

Commit

Permalink
Metagov core version detects whether or not to use httpwrapper version
Browse files Browse the repository at this point in the history
  • Loading branch information
shaunagm committed Dec 17, 2021
1 parent 6ea8f7e commit d65fbd3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions metagov/metagov/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,17 @@ def get_plugin_instance(plugin_name, community, community_platform_id=None):


def get_configuration(config_name, **kwargs):

# if multi driver functionality is on, use httpwrapper's version of get_configuration
from django.conf import settings
if hasattr(settings, "MULTI_DRIVER") and settings.MULTI_DRIVER:
from metagov.httpwrapper.utils import get_configuration as multidriver_get_configuration
return multidriver_get_configuration(config_name, **kwargs)

# otherwise just get from environment
from metagov.settings import TESTING
default_val = TESTING if TESTING else None

return env(config_name, default=default_val)


Expand Down

0 comments on commit d65fbd3

Please sign in to comment.