Django Application Life Cycle


A project is a group of applications. Each and every application has a specific aim and this application can be included in any project. For example, you can create an application which serves as a contact form and that can be reused in several different projects.

Also Read: Django Project Creation

Application Creation
Locate your project’s directory. Now, in your myproject folder (the main folder), go for To do so, follow the given command:

$ python startapp myapp

By using the above command, you have successfully created an application under the name myapp. And as earlier mentioned, there will be an automated folder generation with the name myapp. The structure of this folder will appear as the following:


* : This is the initial file to ensure that Python considers this directory as a package.

* : This file enables the app to get modified whenever opened in the admin interface.

* : This file contains all of the application models.

* : All the unit tests are saved in this file.

* : This is the home to all your application views.

How One Can Get The Project to Know About Your Application?
We have successfully created the myapp application. Now, to get it acknowledged by your project, you need to register this newly created application with the already created myproject project. To perform this, you need to update the INSTALLED_APPS tuple. You can locate this in the file. In here, you are required to add your application’s name. The file will somewhat appear like the following: