Flask
- 8 ответов
- 0 вопросов
12
Вклад в тег
session.query(User).join(UserItem, Lang)
session.query(UserItem.id, UserItem.date, UserItem.item_name, Lang.desc_rus, User.email).join(User, Lang)
from flask import Flask, render_template
from flask.ext.sqlalchemy import SQLAlchemy as SA
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql+mysqlconnector://user:pass@localhost:3306/app_db'
db = SA(app)
from sqlalchemy import create_engine
db.metadata.reflect(db.engine)
from Classes import *
@app.route('/')
def get_index():
Users.query.all()
return 'Hello World!'
if __name__ == '__main__':
app.run(debug=True)
pass