flask-wallapop-watcher/models.py

21 lines
604 B
Python
Raw Permalink Normal View History

2017-08-07 19:54:39 +02:00
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_script import Manager
from flask_migrate import Migrate, MigrateCommand
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///database.sqlite'
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
db = SQLAlchemy(app)
migrate = Migrate(app, db)
manager = Manager(app)
manager.add_command('db', MigrateCommand)
class Programado(db.Model):
id = db.Column(db.Integer, primary_key=True)
title = db.Column(db.String(128))
2017-08-29 13:44:58 +02:00
last_item = db.Column(db.Integer)
2017-08-07 19:54:39 +02:00
if __name__ == "__main__":
manager.run()