隐藏密码和数据库密码瓶应用程序

时间:2019-05-20 01:53:25

标签: python python-3.x heroku flask passwords

使用Heroku部署Flask应用程序的工作;如何隐藏所有    密码(数据库密码),在Heroku中将其设置为env var

from flask import Flask, render_template, redirect, url_for, session, flash
from flask_dance.contrib.facebook import make_facebook_blueprint, facebook
from functools import wraps
from flask_sqlalchemy import SQLAlchemy
import myDB, myPB
import hashlib, string, random

import json, time

app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://root:hello-world123@localhost/iotstorage'
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False

db = SQLAlchemy(app)

alive = 0
data = {}

facebookId = "18084404596123"
facebookSecret = "da8512c089189c459af93ab7df8e37b"

facebook_blueprint = make_facebook_blueprint(client_id=facebookId, client_secret=facebookSecret)
app.register_blueprint(facebook_blueprint, url_prefix='/facebook_login')

0 个答案:

没有答案