PyCharm 2024.1 Help

View the model dependency diagram

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.

Model dependency diagram enables you to get an overview of the models within your Django application, and analyze their relationships.

Model dependency diagrams are available for:

  • Django models

  • SQLAlchemy

Django Model Dependencies diagram

To open the Model Dependency diagram of a project

  1. Do one of the following:

    • From the context menu of the Project tool window, or the editor, point to Diagrams, and choose Show Diagram or Show Diagram Pop-up.

    • Press Ctrl+Alt+Shift+U, or Ctrl+Alt+U.

  2. Select the type of diagram from the popup:

    Select a diagram type

In the Model Dependency diagram, you can perform the following operations

Last modified: 28 March 2024