You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
748 B
Python

from flask import Blueprint, render_template, request
from app.models import Operation
from app import config
bp = Blueprint('meta', 'meta')
@bp.route('/')
def index():
funded_ops = Operation.query.filter(
Operation.droplet_id > 0
)
return render_template(
'index.html',
funded_ops=funded_ops,
site_name=config.DO_DOMAIN,
)
@bp.route('/info')
def info():
return render_template(
'info.html',
prices=Operation().get_pricing(),
config=config
)
@bp.route('/stats')
def stats():
token = config.STATS_TOKEN == request.args.get('token')
ops = Operation.query.all()
return render_template(
'stats.html',
ops=ops,
token=token
)