changes to jinja2 templates; issue a warning if .env is not loaded
This commit is contained in:
parent
c56594345a
commit
8e12714026
4 changed files with 16 additions and 5 deletions
|
|
@ -18,7 +18,8 @@ __version__ = '0.3.3'
|
|||
|
||||
APP_BASE_DIR = os.path.dirname(os.path.dirname(__file__))
|
||||
|
||||
dotenv.load_dotenv()
|
||||
if not dotenv.load_dotenv():
|
||||
warnings.warn('.env not loaded; application may break!', UserWarning)
|
||||
|
||||
app = Flask(__name__)
|
||||
app.secret_key = os.getenv('SECRET_KEY')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue