Skip to content

Commit

Permalink
Create views.py
Browse files Browse the repository at this point in the history
  • Loading branch information
KOSASIH authored Aug 10, 2024
1 parent 8430989 commit 2dd7bc6
Showing 1 changed file with 13 additions and 0 deletions.
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)

0 comments on commit 2dd7bc6

Please sign in to comment.