Advertisement



< Prev
Next >



Django Template Tags



In this tutorial, we are going to give you an introduction of some built-in tags in Django Template System. So, let us see what these tags are in the following table.


Tags Description
if
The if tag corresponds to the if conditional statement which is used when we want to test a condition for a boolean value - true or false.


if else
The if tag can be associated with an optional else tag, where the if tag corresponds to the if conditional statement which is used when we want to test a condition for a boolean value - true or false and the else tag corresponds to the else in the if-else conditional statement. .


for
The for tag corresponds to the for looping construct statement, which is to execute statements in a loop(again and again) while iterating over a sequence of values..


ifequal
The functioning of ifequal tag corresponds to the == relational operator which is used to check the equality between the two values..


ifnotequal
The functioning of ifnotequal tag corresponds to the != relational operator which is used to check the inequality between the two values..


elif
The if tag can be associated with an optional elif tag, where the if tag corresponds to the if conditional statement which is used when we want to test a condition for a boolean value - true or false and the ellif tag corresponds to the elif conditional statement. .




In our next article, we are going to give you a detailed explanation on the built-in if tag of Django Template System.




Please share this article -




< Prev
Next >
< Template with a Custom Class
Template with if tag >



Advertisement

Please Subscribe

Please subscribe to our social media channels for daily updates.


Decodejava Facebook Page  DecodeJava Twitter Page Decodejava Google+ Page




Advertisement



Notifications



Please check our latest addition

C#, PYTHON and DJANGO


Advertisement