bugl
bugl
HomeLearnPatternsSearch
HomeLearnPatternsSearch

Loading lesson path

Learn/Django

Django

Django Syntax

Django Syntax focused on Django Template Variables and related concepts.

Lesson 1

Django Template Variables

Django Template Variables

2 min
Read lesson →
Lesson 2visual

Django Template Tags

Template Tags In Django templates, you can perform programming logic like executing if statements and for loops. These keywords, if and for, are called "template tags" in Django. To execute template…

2 min
Read lesson →
Lesson 3

Django if Tag

If Statement An if statement evaluates a variable and executes a block of code if the value is true. Example {% if greeting == 1 %} <h1>Hello</h1> {% endif %} Elif The elif keyword says "if the previ…

4 min
Read lesson →
Lesson 4visual

Django for Tag

For Loops A for loop is used for iterating over a sequence, like looping over items in an array, a list, or a dictionary. Example Loop through the items of a list: {% for x in fruits %} <h1></h1> {%…

3 min
Read lesson →
Lesson 5

Django comment Tag

Comments Comments allows you to have sections of code that should be ignored. Example <h1>Welcome Everyone</h1> {% comment %} <h1>Welcome ladies and gentlemen</h1> {% endcomment %} Comment Descriptio…

2 min
Read lesson →
Lesson 6

Django include Tag

Django include Tag

2 min
Read lesson →