-3 Removals
+11 Additions
from flask import Flask
from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
app = Flask(__name__)
app = Flask(__name__)
@app.route("/")
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///people.db'
def hello():
db = SQLAlchemy(app)
return "Hello World!"
class Person(db.Model):
id = db.Column(db.Integer, primary_key=True)
first_name = db.Column(db.Text)
last_name = db.Column(db.Text)
db.create_all()
if __name__ == "__main__":
if __name__ == "__main__":
app.run()
app.run()
Editor
Clear
Export as PDF