January 2018
Intermediate to advanced
366 pages
9h 7m
English
The config.py file is where the settings for each development environment exist. The file is divided into classes that have the definition of each environment.
The first class is BaseConfig. This class is used only as an inheritance for the other classes:
class BaseConfig:
"""Base configuration"""
DEBUG = False
TESTING = False
MONGODB_SETTINGS = {}
After the declaration of BaseConfig, we will declare the other classes that manipulate the configuration of each environment. In this case, the environments are Development, Test, and Production, representing each of the environments that we have—DevelopmentConfig, TestingConfig, and ProductionConfig classes respectively.
The classes have identical structures, ...
Read now
Unlock full access