[Bugfix] Use FLASK_ENV for the config filename instead of ENV

This commit is contained in:
Gergely Polonkai 2018-07-25 20:24:51 +02:00
parent 5996ae7079
commit 1e1e085ba4

View File

@ -72,7 +72,7 @@ class CalendarSocialApp(Flask, RoutedMixin):
self._timezone = None self._timezone = None
config_name = os.environ.get('ENV', config or 'development') config_name = os.environ.get('FLASK_ENV', config or 'development')
self.config.from_pyfile(f'config_{config_name}.py', True) self.config.from_pyfile(f'config_{config_name}.py', True)
# Make sure we look up users both by their usernames and email addresses # Make sure we look up users both by their usernames and email addresses
self.config['SECURITY_USER_IDENTITY_ATTRIBUTES'] = ('username', 'email') self.config['SECURITY_USER_IDENTITY_ATTRIBUTES'] = ('username', 'email')