summaryrefslogtreecommitdiffstats
path: root/bitvend/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitvend/views.py')
-rw-r--r--bitvend/views.py26
1 files changed, 13 insertions, 13 deletions
diff --git a/bitvend/views.py b/bitvend/views.py
index 95b5dfe..f9b6920 100644
--- a/bitvend/views.py
+++ b/bitvend/views.py
@@ -17,6 +17,11 @@ bp = Blueprint('bitvend', __name__, template_folder='templates')
@bp.route('/')
def index():
transactions = []
+ hallofshame = User.query \
+ .order_by(User.balance.asc()) \
+ .filter(User.balance < 0) \
+ .limit(5) \
+ .all()
if current_user.is_authenticated:
transactions = current_user.transactions.order_by(Transaction.created.desc()).limit(10)
@@ -26,6 +31,14 @@ def index():
items=app.config['ITEMS'],
transactions=transactions,
transfer_form=TransferForm(),
+ hallofshame=hallofshame,
+ )
+
+@bp.route('/transactions/', defaults={'page': 1})
+@bp.route('/transactions/p/<int:page>')
+def transactions(page):
+ return render_template('transactions.html',
+ transactions=current_user.transactions.paginate(page)
)
@bp.route('/transfer', methods=['GET', 'POST'])
@@ -100,19 +113,6 @@ def cancel():
return redirect(url_for('.index'))
-@bp.route('/reclaim/<tx_hash>')
-@login_required
-def reclaim(tx_hash):
- tx = Transaction.query.filter_by(tx_hash=tx_hash).first()
-
- if tx and tx.product_id is None:
- dev.begin_session(tx.value, tx_hash)
- dev.begin_session(tx.value, tx_hash)
- dev.begin_session(tx.value, tx_hash)
- return redirect('/log')
-
- abort(404)
-
@bp.route('/qrcode/<path:data>')
def qrcode_gen(data):
bio = six.BytesIO()