Ejemplo n.º 1
0
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)
Ejemplo n.º 2
0
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)
Ejemplo n.º 3
0
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')
Ejemplo n.º 4
0
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')
Ejemplo n.º 5
0

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