C H A P T E R   5

image

Expanding the Weblog

So far you've written two models for your weblog application—Category and Entry—and set up views that will display the entries in the weblog. You still have some work to do to set up all the different views you'll want for the entries; however, before you do that, let's go back and finish up the weblog's data models by adding the final model class.

Writing the Link Model

Just as the fields on the Entry model logically broke down into groups according to how they would be used, the model you'll use to represent links—a class called Link—will need fields for several different purposes:

  • Core fields representing ...

Get Practical Django Projects, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.