python - How to make a page not directly accessible in Flask? -


I am developing a web application using flask microfworks.

I have to see a scene, it is only accessible when it is not sent directly from any other view and to users.

To make it more clear:

  @ app.route ('/', methods @ ('GET', 'POST')) @ app Route ('/ home', methods = ('GET', 'POST')) DEF Home (): # Some code return redirects (url_for (in 'progress', parameter) @ app.route (' / path / & lt ; Parameters & gt; '' in Progress: def: Return the render_template (...)   

The progress in the scene should be accessible only when it is called "from home view" Is it possible?

Is it possible?

redirect before, session Set a flag in the object. Check the "progress" view to that flag If this is set, Groove is to present the page. If it is not there, then redirect them to another page (and flash the warning about trying to access that page, alternatively).

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -