Fix SECRET_KEY property issue
This commit is contained in:
parent
5abd4ddd76
commit
841110faca
|
|
@ -16,13 +16,7 @@ class DevelopmentConfig(Config):
|
||||||
|
|
||||||
class ProductionConfig(Config):
|
class ProductionConfig(Config):
|
||||||
DEBUG = False
|
DEBUG = False
|
||||||
|
SECRET_KEY = os.environ.get('SECRET_KEY')
|
||||||
@property
|
|
||||||
def SECRET_KEY(self):
|
|
||||||
key = os.environ.get('SECRET_KEY')
|
|
||||||
if not key:
|
|
||||||
raise ValueError('SECRET_KEY environment variable must be set in production')
|
|
||||||
return key
|
|
||||||
|
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue