[Bugfix] Fix the environment name for dev mode

It turns out Flask only considers `development` as the development mode; `dev` (used before) is
not working.
This commit is contained in:
Gergely Polonkai 2018-07-23 11:09:29 +02:00
parent 9b27491652
commit 387b7d83ac
2 changed files with 2 additions and 2 deletions

View File

@ -72,7 +72,7 @@ class CalendarSocialApp(Flask, RoutedMixin):
self._timezone = None self._timezone = None
config_name = os.environ.get('ENV', config or 'dev') config_name = os.environ.get('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')

View File

@ -1,7 +1,7 @@
"""Configuration file for the development environment """Configuration file for the development environment
""" """
ENV = 'dev' ENV = 'development'
#: If ``True``, registration on the site is enabled. #: If ``True``, registration on the site is enabled.
REGISTRATION_ENABLED = True REGISTRATION_ENABLED = True
#: The default time zone #: The default time zone