def allcontact(): verose = False if "-v" in str(sys.argv): verose = True p = Parse(verose) data = p.information return render_template('allcontact.html', data=data)
def hello(): verose = False if "-v" in str(sys.argv): verose = True p = Parse(verose) data = p.information return render_template('home.html', data=data)
def downcontact(): verose = False if "-v" in str(sys.argv): verose = True p = Parse(verose) data = p.information df = pd.DataFrame(data) df.to_csv('allcontact.csv') flash("All phone numbers downloaded.") return render_template('filter.html')
def downall(): verose = False if "-v" in str(sys.argv): verose = True p = Parse(verose) data = p.information df = pd.DataFrame(data) df.to_csv('alldata.csv') flash("All data downloaded.") # return 'file downloaded\n' return render_template('filter.html')
app = Flask(__name__) app.config["OIDC_CLIENT_SECRETS"] = "client_secrets.json" app.config["OIDC_COOKIE_SECURE"] = False app.config["OIDC_CALLBACK_ROUTE"] = "/oidc/callback" app.config["OIDC_SCOPES"] = ["openid", "email", "profile"] app.config["SECRET_KEY"] = environ.get("SECRET_KEY") app.config["OIDC_ID_TOKEN_COOKIE_NAME"] = "oidc_token" oidc = OpenIDConnect(app) okta_client = UsersClient("http://dev-363595.okta.com", "006AeB7u4B3zN3IQBYBdXVTluHFvyWucqCqcavGwlt") verose = False if "-v" in str(sys.argv): verose = True p = Parse(verose) data= p.information @app.before_request def before_request(): if oidc.user_loggedin: g.user = okta_client.get_user(oidc.user_getfield("sub")) else: g.user = None @app.route('/') def iindex(): return render_template("index.html") @app.route("/dashboard") @oidc.require_login