0

How do I force the user to complete a form before allowing them to move to other routes in Flask.

I wanted to avoid creating user logins as I didn't want to create a database for individual users. I just wanted to force any user to complete a form before getting access to other urls in the flask applications.

davidism
  • 121,510
  • 29
  • 395
  • 339
Jeff Boker
  • 803
  • 1
  • 9
  • 25

1 Answers1

0

You can use sessions to store data from the form. Then in each route check if the sessions contains data. If it doesn't it means that the user hasn't completed the form. If so then redirect the user to the form route

DevHyperCoder
  • 895
  • 1
  • 9
  • 22