Book Image

Django 1.0 Template Development

Book Image

Django 1.0 Template Development

Overview of this book

Table of Contents (17 chapters)
Django 1.0 Template Development
Credits
About the Author
About the Reviewers
Preface
Index

Chapter 3. Template Context

The Context is a special collection of data that is used to pass information from your views into your templates. Since the template system is only allowed to work with values that you explicitly give it access to, understanding how to work with the Context is a very important skill for template design and debugging.

In this chapter, we will:

  • Learn how the Context object works

  • Work with context values in templates

  • Explore some shortcuts for rendering the context

  • Use context processors to automatically add values to the context

  • Use Django shortcuts to simplify rendering a template in context