Exemplo n.º 1
0
def index():
    torrents = QueueEntry.select().reversed()
    return render_template('index.html', torrents=torrents)
Exemplo n.º 2
0
from model import QueueEntry

db_filename = os.path.abspath(app.config["DATABASE"])
if os.path.exists(db_filename):
    os.unlink(db_filename)
connection_string = "sqlite:" + db_filename
connection = connectionForURI(connection_string)
sqlhub.processConnection = connection

QueueEntry.createTable()