-
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
13 additions
and
0 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
blockchain_integration/pi_network/PiFusion/pi_fusion_dashboard/views.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from flask import render_template | ||
from flask_restful import Resource | ||
from models import Node, Transaction | ||
|
||
class NodeView(Resource): | ||
def get(self, node_id): | ||
node = Node.query.get(node_id) | ||
return render_template('node.html', node=node) | ||
|
||
class TransactionView(Resource): | ||
def get(self, transaction_id): | ||
transaction = Transaction.query.get(transaction_id) | ||
return render_template('transaction.html', transaction=transaction) |