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 6. Serving Multiple Templates

There are times when we will need to serve the same content in multiple ways whether it's displaying a printable version of a page, creating festive themes for holidays or promotions, or using a different set of templates for mobile devices.

There are a number of approaches to these tasks, and no one is "right". As we will see, the best choice depends on the circumstances specific to your site and users.

In this chapter we will:

  • Consider the different approaches to tailoring output

  • Explore the challenges of serving content to mobile devices

  • Create printer-friendly output via URL parameters

  • Easily create site themes by overriding template files

  • Use a second domain name to serve mobile templates

  • Automatically redirect mobile users to an alternative URL