forked from gergely/calendar-social
[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:
parent
9b27491652
commit
387b7d83ac
@ -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')
|
||||||
|
@ -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
|
Loading…
Reference in New Issue
Block a user