I'm attempting to run 2 types of commands in my Flask App and function named extract_subpath works fine but my index function does not and vice versa.
does anyone have any solutions? i'm a beginner in flask as well.
from flask import Flask, render_template, request, flash, redirect
app = Flask(__name__)
@app.route('/')
def index(): return render_template("index.html")
@app.route('/<path:subpath>')
def extract_subpath(subpath):
# print({subpath})
# return f"The subpath is: {subpath}"
redirect_url = "sms:123456789?&body=" + subpath
return redirect(redirect_url, code=302)
[edit by admin: formatting]