From bf0ad7755b2a28883236664aa3cc405667f6a657 Mon Sep 17 00:00:00 2001 From: ShauryaJ1 <93232361+ShauryaJ1@users.noreply.github.com> Date: Mon, 17 Oct 2022 07:28:27 -0400 Subject: [PATCH] added print functionality to input boxes --- app.py | 15 +++++++++++++-- templates/base.html | 4 ++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/app.py b/app.py index 629af69..233d661 100644 --- a/app.py +++ b/app.py @@ -1,7 +1,8 @@ # app.py -from flask import Flask, render_template +from flask import Flask, render_template, request from flask_assets import Bundle, Environment +import jyserver.Flask as jsf app = Flask(__name__) @@ -11,10 +12,20 @@ css = Bundle("src/main.css", output="dist/main.css") assets.register("css", css) css.build() +@jsf.use(app) +class App: + def __init__(self) -> None: + pass + + def printinput(self): + x = self.js.document.getElementById('userInput').value + print(x) + @app.route("/") def homepage(): - return render_template("index.html") + + return App.render(render_template("index.html")) if __name__ == "__main__": diff --git a/templates/base.html b/templates/base.html index 24b2fd9..856e3f1 100644 --- a/templates/base.html +++ b/templates/base.html @@ -32,10 +32,10 @@ - +
Deg