Im using a .js file in the same folder from .html files and shows on console that theres nothing inside the .js file
heres the code
https://replit.com/@AlexandreModesto/solicitacoes
Im using a .js file in the same folder from .html files and shows on console that theres nothing inside the .js file
heres the code
https://replit.com/@AlexandreModesto/solicitacoes
You need to host the JavaScript file, try this: app = Flask(__name__, static_url_path="/templates")
.
AFAIK the index
function contents can be simplified to just
return (
render_template("page1.html", **request.form)
if request.method == "POST"
else render_template("index.html")
)
And the page1
function could be
def page1(**args):
return render_template("page1.html", **args)