Chapter 11. Generating Non-HTML Content

Usually when we talk about developing Web sites, we're talking about producing HTML. Of course, there's a lot more to the Web than HTML; we use the Web to distribute data in all sorts of formats: RSS, PDFs, images, and so forth.

So far we've focused on the common case of HTML production, but in this chapter we'll take a detour and look at using Django to produce other types of content.

Django has convenient built-in tools that you can use to produce some common non-HTML content:

  • RSS/Atom syndication feeds

  • Sitemaps (an XML format originally developed by Google that gives hints to search engines)

We'll examine each of those tools a little later on, but first we'll cover the basic principles.

The Basics: Views and ...

Get The Definitive Guide to Django: Web Development Done Right now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.