Create an App in Django Project

In last post we saw how to create a project in Django. Now lets see how to create an app in Django Project.

Once the project in create make sure you are in the directory which contains manage .py  Now make use the following to create an app inside the project:

python manage.py startapp app1

This creates a folder with following files:

1. another __init.py__.py which has same functionality as in project.

2. models.py in order to place data models, entities and relationships.

3. tests.py: test functions for your code

4. views.py: series of functions which return clients requests and responses.

5. admin.py: this the place where you register your models and views in the your python application.