-
Book Overview & Buying
-
Table Of Contents
Django 1.0 Website Development
By :
You have learned many interesting features in this chapter. You are now able to create any type of web feed with ease. You also gained a lot of information on how to use the Django database API to query data models in various ways. Finally, you learned about pagination in Django and applied it to a view in the project.
Here is a quick summary of the features covered in this chapter:
To create a feed in Django, derive a class that represents the feed from the Feed base class, and define the properties of the feed (title, link, description) and a method called items that returns the items of the feed in this class.
To customize the rendering of item fields in the feed (such as title and description), create a directory called feeds in the templates directory. Inside it, create templates with filenames that use the format feedname_fieldname.html. The contents of these templates will be used to render item fields.
Q objects are very useful to construct complex queries. They encapsulate...
Change the font size
Change margin width
Change background colour