How to add a new Django application to a project¶

    This article assumes you are already familiar with the steps involved. Fora full walk-through, see the Add new applications to the project section ofthe .

    The recommended way of installing Django applications is to use a Divio Cloudaddon - an application that has already been packaged for easy installation inour projects.

    If an addon has not yet been created for the application you require, you havetwo options:

    • Add it to requirements.in. See fordetails on how to do this.

    Add the names of any required applications to the method in settings.py.

    Other key settings (such as MIDDLEWARE_CLASSES) will already be defined insettings, so don’t simply declare them (e.g. ). If you do this, you will overwrite existing settings. Instead, usefor example MIDDLEWARE_CLASSES.extend([…]).

    Ordering of settings lists¶

    The ordering of applications, middleware and other settings lists can matter,in which case you may need to make sure you add the item at the start, end orparticular position in the list.

    Edit the urls.py of the project in the usual way, to include the urls.py of your application, for example:

    Alternatively, add the URL configuration to be included via one of the, in your project’s .

    If the application has migrations, you should test them locally. Run: