2. Creating Your First Django Application

This is the chapter where it all starts. In this chapter, you’re going to see how to create working Django applications.

When you create a project, as we did in the previous chapter, it’s empty. You have to add your own applications to it, and that takes some work. We’ll look at that here.

Next, you create a view for the application. The view is what’s called the controller in MVC applications—it’s the brain of the application. In this chapter, we’ll create a view and link it to the application, a process that includes telling Django which URLs the user can enter to see your new view.

After creating the view and linking it to a URL, we’ll launch the new application to make sure it actually runs. If everything ...

Get Django: Visual QuickPro Guide now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.