O'Reilly logo

Django: Visual QuickPro Guide by Steven Holzner

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

3. Storing Data in your Model

In the previous chapter, we created our first Django application and got it running. That application gave us some experience with the structure of a Django project and an application in the project.

In particular, we set up two of the three primary parts of a Django application: the view and the template. We created two views: one that simply passed a text string containing HTML to the browser, and one that passed variables to the template. The variables in question contained text strings corresponding to the resulting Web page’s title, header, and text. The template we created and connected to the application read the data passed to it through the Context object. The template read variables by name and inserted ...

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