Add enviroment variables
This commit is contained in:
parent
fddb20c713
commit
2fcf9d7a33
3
app.py
3
app.py
@ -1,3 +1,4 @@
|
|||||||
|
import os
|
||||||
from flask import Flask, redirect, url_for, render_template, request, flash
|
from flask import Flask, redirect, url_for, render_template, request, flash
|
||||||
from models import db, Contact
|
from models import db, Contact
|
||||||
from forms import ContactForm
|
from forms import ContactForm
|
||||||
@ -8,7 +9,7 @@ app.config['SECRET_KEY'] = 'my secret'
|
|||||||
app.config['DEBUG'] = False
|
app.config['DEBUG'] = False
|
||||||
|
|
||||||
# Database
|
# Database
|
||||||
app.config['SQLALCHEMY_DATABASE_URI'] = 'postgresql://bgcmtrdgusuwik:05060b67183fb8ba7ddb937aaec3f6a20617b3bbd547ce89a19eceb760f6fa4b@ec2-54-217-217-142.eu-west-1.compute.amazonaws.com:5432/d2po2asdglml7g'
|
app.config['SQLALCHEMY_DATABASE_URI'] = os.environ.get('DATABASE_URI')
|
||||||
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
|
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
|
||||||
db.init_app(app)
|
db.init_app(app)
|
||||||
|
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
|
import os
|
||||||
from flask import Flask
|
from flask import Flask
|
||||||
from flask_sqlalchemy import SQLAlchemy
|
from flask_sqlalchemy import SQLAlchemy
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
app.config['SQLALCHEMY_DATABASE_URI'] = 'postgresql://bgcmtrdgusuwik:05060b67183fb8ba7ddb937aaec3f6a20617b3bbd547ce89a19eceb760f6fa4b@ec2-54-217-217-142.eu-west-1.compute.amazonaws.com:5432/d2po2asdglml7g'
|
app.config['SQLALCHEMY_DATABASE_URI'] = os.environ.get('DATABASE_URI')
|
||||||
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
|
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
|
||||||
db = SQLAlchemy(app)
|
db = SQLAlchemy(app)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user