Skip to content

Commit

Permalink
Merge 76a98e8 into bc67c58
Browse files Browse the repository at this point in the history
  • Loading branch information
hluk committed Feb 16, 2023
2 parents bc67c58 + 76a98e8 commit 794a573
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 4 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
#
import os
import sys

# This will cause the Flask application to be created with development configs
os.environ['DEV'] = 'true'

sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '../')))
import greenwave # noqa: E402

Expand Down
6 changes: 1 addition & 5 deletions greenwave/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def load_config(config_obj=None):
if config_obj is None:
if os.getenv('TEST') == 'true':
config_obj = 'greenwave.config.TestingConfig'
elif os.getenv('DEV') == 'true' or os.getenv('DOCS') == 'true':
elif os.getenv('DEV') == 'true':
config_obj = 'greenwave.config.DevelopmentConfig'
else:
config_obj = 'greenwave.config.ProductionConfig'
Expand All @@ -86,10 +86,6 @@ def load_config(config_obj=None):
default_config_file = os.path.join(os.getcwd(), 'conf', 'settings.py.example')
elif os.getenv('DEV') == 'true':
default_config_file = os.path.join(os.getcwd(), 'conf', 'settings.py')
elif os.getenv('DOCS') == 'true':
default_config_file = os.path.normpath(
os.path.join(os.getcwd(), '..', 'conf', 'settings.py.example')
)
else:
default_config_file = '/etc/greenwave/settings.py'

Expand Down

0 comments on commit 794a573

Please sign in to comment.