forked from orbit-oss/flask
Removed misleading DEBUG variable from examples
This commit is contained in:
parent
9075da126c
commit
aec07a1cb5
1 changed files with 1 additions and 6 deletions
|
|
@ -429,7 +429,6 @@ sure to use uppercase letters for your config keys.
|
||||||
Here is an example of a configuration file::
|
Here is an example of a configuration file::
|
||||||
|
|
||||||
# Example configuration
|
# Example configuration
|
||||||
DEBUG = False
|
|
||||||
SECRET_KEY = b'_5#y2L"F4Q8z\n\xec]/'
|
SECRET_KEY = b'_5#y2L"F4Q8z\n\xec]/'
|
||||||
|
|
||||||
Make sure to load the configuration very early on, so that extensions have
|
Make sure to load the configuration very early on, so that extensions have
|
||||||
|
|
@ -554,7 +553,6 @@ An interesting pattern is also to use classes and inheritance for
|
||||||
configuration::
|
configuration::
|
||||||
|
|
||||||
class Config(object):
|
class Config(object):
|
||||||
DEBUG = False
|
|
||||||
TESTING = False
|
TESTING = False
|
||||||
DATABASE_URI = 'sqlite:///:memory:'
|
DATABASE_URI = 'sqlite:///:memory:'
|
||||||
|
|
||||||
|
|
@ -562,7 +560,7 @@ configuration::
|
||||||
DATABASE_URI = 'mysql://user@localhost/foo'
|
DATABASE_URI = 'mysql://user@localhost/foo'
|
||||||
|
|
||||||
class DevelopmentConfig(Config):
|
class DevelopmentConfig(Config):
|
||||||
DEBUG = True
|
pass
|
||||||
|
|
||||||
class TestingConfig(Config):
|
class TestingConfig(Config):
|
||||||
TESTING = True
|
TESTING = True
|
||||||
|
|
@ -589,7 +587,6 @@ your configuration classes::
|
||||||
|
|
||||||
class Config(object):
|
class Config(object):
|
||||||
"""Base config, uses staging database server."""
|
"""Base config, uses staging database server."""
|
||||||
DEBUG = False
|
|
||||||
TESTING = False
|
TESTING = False
|
||||||
DB_SERVER = '192.168.1.56'
|
DB_SERVER = '192.168.1.56'
|
||||||
|
|
||||||
|
|
@ -603,11 +600,9 @@ your configuration classes::
|
||||||
|
|
||||||
class DevelopmentConfig(Config):
|
class DevelopmentConfig(Config):
|
||||||
DB_SERVER = 'localhost'
|
DB_SERVER = 'localhost'
|
||||||
DEBUG = True
|
|
||||||
|
|
||||||
class TestingConfig(Config):
|
class TestingConfig(Config):
|
||||||
DB_SERVER = 'localhost'
|
DB_SERVER = 'localhost'
|
||||||
DEBUG = True
|
|
||||||
DATABASE_URI = 'sqlite:///:memory:'
|
DATABASE_URI = 'sqlite:///:memory:'
|
||||||
|
|
||||||
There are many different ways and it's up to you how you want to manage
|
There are many different ways and it's up to you how you want to manage
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue