O'Reilly logo

Sams Teach Yourself Django in 24 Hours by Brad Dayley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 8. Using Built-in Template Tags to Enhance Views

<feature><title>What You’ll Learn in This Hour</title> <objective>

How to use for loops to generate HTML code from lists

</objective>
<objective>

How to use if logic to add conditional HTML code to templates

</objective>
<objective>

How to add dynamic links to templates

</objective>
<objective>

How to reduce template code by using the with tag

</objective>
<objective>

How to add cycling behavior to enhance table views

</objective>
</feature>

Django has several tags that allow you to implement some basic logic in your templates that helps you reduce the amount of HTML code that you need to write. This hour covers using Django’s built-in template tags to create more complex and useful templates.

Implementing ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required