RE: [Tutorial]Developing and institutions data collection web front-end and back-end with python3.6(Final Part6)

You are viewing a single comment's thread from:

[Tutorial]Developing and institutions data collection web front-end and back-end with python3.6(Final Part6)

in utopian-io •  7 years ago 

I really love the way you applied Jinja logic on this code, but i have a question, please how can i write an else loop?

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

The else boolean is also written similarly to the elif and even the for loop
for instance with jinja we can say

#assuming that we already have our if or if and elif statements
{% else %}
  {<p>whatever content you would like to display</p>
{%endelse%}

Hope that helps