This will be more advanced.
In many routes, there are a few lines that check for is-a-user-logged-in. You could solve this by writing your own “decorator”, like “@app.route”, but that checks if the g.user object is not null and, if not, flashes and redirects.
You’ll need to do some searching and reading about Python decorators to do this.
This will be more advanced. In many routes, there are a few lines that check for is-a-user-logged-in. You could solve this by writing your own “decorator”, like “@app.route”, but that checks if the g.user object is not null and, if not, flashes and redirects.
You’ll need to do some searching and reading about Python decorators to do this.