Example #1
0
from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
from sqlalchemy import create_engine
from flask_s3 import FlaskS3
from config import basedir

# application object
application = Flask(__name__)
application.config.from_object("config")

application.config["FLASKS3_BUCKET_NAME"] = "ayakov.com"
s3 = FlaskS3(application)

application.secret_key = "alpine"

application.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///posts.db"  # local db is here

# create sqlalchemy object
db = SQLAlchemy(application)

from app import views, models
Example #2
0
app = Flask(__name__)  # create our flask app
app.config.from_object("config")

# cron= Schedular(daemon=True)
# cron.start()
# ///////////////////////////////////////////////////////////

engine = create_engine("sqlite:///app.db")
db.metadata.bind = engine

DBsession = sessionmaker(bind=engine)
sessionn = DBsession()

# /////////////////////////////////////////////////s3 details
app.config["FLASKS3_BUCKET_NAME"] = "mybucketname"
s3 = FlaskS3(app)

app.secret_key = "327e5fca521b4e91818db7e39ec998d3"

# /////////////////////////////////////////////////////////////////////////

lm = LoginManager()
lm.init_app(app)
lm.login_view = "/connect"

# ////////////////////////////////////////////////////////////////////////

# configure Instagram API
instaConfig = {
    "client_id": "0bfa1f7417f54c79b433437420b338b1",