I'm trying to develop a website using flask and python. I've come to a point where I'm trying to create a login for login experience and can't quite get it. I'll jump to an example:
elif request.method == 'POST':
<<do stuff>>
return render_template(
'something.html',
somedata
)
But the url doesn't change. That is perfectly fine in some cases, but I want it to change from say /login to /main for 2 reasons. a) aesthetic (well, I could work this one out with a bit of creativity) b) I don't think there is a way to handle 2 different POST "events" (or is there?).
Also I'm quite concerned with the POST part. What if I need 2 different buttons on the same page, is it possible to work around that? Or am I missing something?