O'Reilly logo

Practical Django Projects, Second Edition by James Bennett

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required