• Cabinet
    • Member's benefits

      • Create study meterials
      • Subscribe for quizzes
      • Practice in Flashcards mode
      • Practice in Quiz mode
      • Track your progress and identify weak spots
      • Add explanations
      • Discuss topics with others
      • Create and join study groups
      • Have fun and connect with friends!

      Sign In

      Sign in Register
  • Discover
    • Study materials
    • Study groups
  • Announcements
  • Practice
    • Please sign in to practice

Comment

{% comment %} {% endcomment %}

  • 0 explanations
  • 0 requizzes

Cycle

{% for i in list %} <li class="{% cycle 'one' 'two' %}"> ... </li> {% endfor %}

  • 2 explanations
  • 0 requizzes

Apply one or more filters

{% filter filter_1|filter_2 %} ... {% endfilter %}

  • 0 explanations
  • 0 requizzes

Loop through a dictionary

{% for key, value in data.items %} {{ key }}: {{ value }} {% endfor %}

  • 0 explanations
  • 0 requizzes

Loop through a list

{% for x in some_list %} Item {{ x }} {% endfor %}

  • 0 explanations
  • 0 requizzes

Loop through a list of lists

{% for x, y in points %} There is a point at {{ x }},{{ y }} {% endfor %}

  • 0 explanations
  • 0 requizzes

What variable is not available within the for loop

forloop.counter

forloop.counter0

forloop.revcounter

forloop.revcounter0

forloop.first

forloop.last

forloop.parentloop

forloop.second

  • 0 explanations
  • 0 requizzes

Empty array

{% for item in items_list %} <li>{{ item }}</li> {% empty %} <li>No items at the moment</li> {% endfor %}

  • 0 explanations
  • 0 requizzes

If statement

{% if option1 %} <p>This is first option</p> {% elif option2 %} <p>not first, but second option</p> {% else %} <p>no matches </p> {% endif %}

  • 0 explanations
  • 0 requizzes

Comparison if equal

{% ifequal user.pk comment.user_id %} ... {% endifequal %}

  • 0 explanations
  • 0 requizzes

Include template

{% include template_name %}

  • 0 explanations
  • 0 requizzes

Include template

{% include template_name %}

  • 0 explanations
  • 0 requizzes

Include template with additional variables passed

{% include "name_snippet.html" with var1="Hello" var2="World" %}

  • 0 explanations
  • 0 requizzes
  • 1

Django template tags and filters

Computer Science

  • Likes: 1
  • Subscribers: 5
  • Questions: 13 (+ 0)
  • ReQuiz count: 0
  • Created: Feb. 4, 2014
  • By: JackD
  • Practiced by everyone: 6 times

Quiz settings


Quizzn is a service that bears only one goal - to make the learning process interactive, social, and easy. It is a free application that has the ability to connect people to learn and share knowledge.

More about us

Get In Touch

Feel like you need to contact us? Please write us a letter.

  • [email protected]

Help

Announcements
Get started

Mobile Support

Quizzn.com is mobile-optimized.

© 2015 Quizzn Inc. All rights reserved.

  • Home
  • Privacy policy
  • Terms of service
  • About