Aberrant/aberrant.py
2019-02-13 10:05:11 -05:00

23 lines
501 B
Python

#!/usr/bin/env python3
"""
The primary module for serving the Aberrant application.
"""
from flask import Flask, render_template
import rtorrent
app = Flask(__name__)
app.jinja_env.trim_blocks = True
app.jinja_env.lstrip_blocks = True
app.jinja_env.undefined = "StrictUndefined"
rtorrent.get_all()
@app.route("/")
def index():
"""The index page."""
torrents = rtorrent.get_active()
return render_template("index.html", **locals())
if __name__ == "__main__":
app.run(host='0.0.0.0', port=5250)