From 387b7d83ac694a18beb08eb916a2b474c547cd8b Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Mon, 23 Jul 2018 11:09:29 +0200 Subject: [PATCH] [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. --- calsocial/__init__.py | 2 +- calsocial/{config_dev.py => config_development.py} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename calsocial/{config_dev.py => config_development.py} (95%) diff --git a/calsocial/__init__.py b/calsocial/__init__.py index 7705892..6f57891 100644 --- a/calsocial/__init__.py +++ b/calsocial/__init__.py @@ -72,7 +72,7 @@ class CalendarSocialApp(Flask, RoutedMixin): 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) # Make sure we look up users both by their usernames and email addresses self.config['SECURITY_USER_IDENTITY_ATTRIBUTES'] = ('username', 'email') diff --git a/calsocial/config_dev.py b/calsocial/config_development.py similarity index 95% rename from calsocial/config_dev.py rename to calsocial/config_development.py index 1a35414..f170db6 100644 --- a/calsocial/config_dev.py +++ b/calsocial/config_development.py @@ -1,7 +1,7 @@ """Configuration file for the development environment """ -ENV = 'dev' +ENV = 'development' #: If ``True``, registration on the site is enabled. REGISTRATION_ENABLED = True #: The default time zone