O'Reilly logo

Django 1.0 Web Site Development by Ayman Hourieh

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

Summary

In this chapter, we learned about the three main components of Django: the view, model, and template. We wrote data models to store the data of our application, and then created views and templates to display this data. We also learned how to map URLs to views, and how to use the interactive console to experiment with our Django project.

The following is a summary of the Django features covered in this chapter:

  • To create an application within a project, run the following command:
    $ python manage.py startapp <app-name>
    
  • After writing a data model, the following command should be run to create the corresponding tables in the database:
    $ python manage.py syncdb
    
  • To view the SQL queries generated by Django, issue the following command:
    $ python manage.py sql <app-name> ...

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