Flask Questions and Answers
Flask Questions and Answers
Two URLs for one function
You just need to write both decorators one after another
@app.route("/")
@app.route("/test")
def test():
return render_template(
"index.html"
)
| Python | |
| Flask | |
| Running Flask on hosting | |
| Running Flask on a Linux server | |
| The first Flask project | |
| Jinja templates | |
| Flask FAQ | |
| Web Forms | |
| Errors |
Article author: Andrei Olegovich