PyCharm 2024.1 Help

Create a Django application in a project

Enable the Django plugin

This functionality relies on the Django plugin, which is bundled and enabled in PyCharm by default. If the relevant features aren't available, make sure that you didn't disable the plugin.

  1. Press Ctrl+Alt+S to open the IDE settings and then select Plugins.

  2. Open the Installed tab, find the Django plugin, and select the checkbox next to the plugin name.

To add a new application to your existing Django project, you can either open the console and execute the startapp task manually, or use the Django Structure tool window.

Add a new app to the Django project

  1. Do one of the following:

    • Go to Tools | Run task or press Ctrl+Alt+R.

      The utility starts in a terminal tab, type startapp.

      Running the startapp command
    • Click New Django App in the toolbar of the Django Structure tool window.

      Creating a Django app in the Django Structure tool window
  2. Specify the name of the app and press Enter.

    Adding a new Django application to the project
  3. The app directory with the required files is added to the project structure.

    Second Django application

    The app is also added to INSTALLED_APPS in

    Second Django application added in
Last modified: 28 March 2024