Add a new app to an exsiting project in Django

In the command line navigate into the exiting project, from here create the new app using the command:

python startapp <appname>

This creates a new directory with several python files:

  • – defines this bundle of scripts as a package
  • – handles the admin side of the app
  • – contains the model classes for the app, handles database stuff
  • – for writing unit tests
  • – define the views for this app

There is also a migrations directory that will hold the database migrations for this app.

Register the new app with your Django project

Open in the main project, and add the app name to the ‘INSTALLED_APPS’ list.