Fixbug bool config

This commit is contained in:
Andros Fenollosa 2017-05-18 19:05:34 +02:00
parent d58c4efcc1
commit 2487ac4030

3
app.py
View File

@ -1,4 +1,5 @@
from os import getenv from os import getenv
from ast import literal_eval
from flask import Flask, redirect, url_for, render_template, flash, session from flask import Flask, redirect, url_for, render_template, flash, session
from functools import wraps from functools import wraps
from forms import LoginForm, SignupForm, EmailResetPasswordForm, ResetPasswordForm from forms import LoginForm, SignupForm, EmailResetPasswordForm, ResetPasswordForm
@ -11,7 +12,7 @@ from crypt import crypt, mksalt, METHOD_SHA512
# Flask # Flask
app = Flask(__name__) app = Flask(__name__)
app.config['SECRET_KEY'] = getenv('SECRET_KEY') app.config['SECRET_KEY'] = getenv('SECRET_KEY')
app.config['DEBUG'] = bool(getenv('DEBUG')) app.config['DEBUG'] = literal_eval(getenv('DEBUG'))
# Database # Database
app.config['SQLALCHEMY_DATABASE_URI'] = getenv('SQLALCHEMY_DATABASE_URI') app.config['SQLALCHEMY_DATABASE_URI'] = getenv('SQLALCHEMY_DATABASE_URI')