Do I have partial view/code behind in Flask?

Posted by hbrlovehaku on Stack Overflow See other posts from Stack Overflow or by hbrlovehaku
Published on 2012-08-28T03:36:24Z Indexed on 2012/08/28 3:38 UTC
Read the original article Hit count: 176

Filed under:

I'm migrating from C#.NET to Python/Flask.

In .NET I have MasterPage, UserControl, PartialView each has its own code behind.

e.g. I can save the check login functions in Login.ascx.cs and render the Login.ascx wherever I'd like to. If logged in, it shows the welcome message, else shows the login form.

But in Flask I only found {% include 'login.html' %} which include the static html file.

How can I implement this design in Flask?

© Stack Overflow or respective owner

Related posts about flask