Example #1
0
from insert_preferences import insert_preferences
from get_preferences import get_preferences
import requests
import json
import datetime

app = Flask(__name__)
app.config.from_object(__name__)
app.secret_key = "any random string"


cache = Cache(app, config={"CACHE_TYPE": "simple"})
twitter_oembedder = TwitterOEmbedder(app, cache, debug=True)
app.config["TWITTER_CONSUMER_KEY"] = "FrTtImImzPxthrIjkTFrsUatY"
app.config["TWITTER_CONSUMER_SECRET"] = "cbPq4hNVEIj87LKcnP4XgCPAdPVc0By8ZVKH7WWVE5H9FS6ihb"
app.config["TWITTER_ACCESS_TOKEN"] = "635902588-6BuJRUYxXQ63vfmQYcP7auLAjkTgxaCRz70MwP5x"
app.config["TWITTER_TOKEN_SECRET"] = "YsLyHMKLoUl47cCge1sBb7KfjDhg2wBbjWhBWm4VVOXtd"


@app.route("/")
# @app.route('/teams/')
def home():

    if "key" in session:
        return render_template("home.html", email=session["key"])
    else:
        return redirect(url_for("login"))


@app.route("/teams/<team_name>/")
def team_name(team_name):