PyCharm 2016.3 Help

Django

File | Settings | Languages and Frameworks | Django for Windows and Linux
PyCharm | Preferences | Languages and Frameworks | Django for OS X
Ctrl+Alt+S

/help/img/idea/2016.3/settings.png

Use this page to configure Django support for each of the projects opened in the same window.

On this page:

Projects pane

ItemDescription
ProjectsThis pane displays the list of projects, opened in the same window. The first project in the list is the primary project.

Django support pane

ItemDescription
Enable Django supportThe default state of this check box depends on the project type. For the empty projects, Django support is disabled. For the Django projects it is enabled by default; you can clear this check box if required. In this case, the other fields become unavailable.
Django project rootBy default, this field shows the directory that stores settings.py and manage.py files of the application. If required, you can specify a different location.
SettingsClick the browse button to select the desired settings file.

Use one of the following approaches:

  • This can be any file with the name matching *settings*.py, located under the Django project root.
  • Point to any Python package and store settings in __init__.py.
    This latter approach is useful when you want to split settings to several modules and import them.

By default, PyCharm shows the settings.py file, located under the Django project root.

Manage.py tasks
Manage scriptSpecify here the desired manage.py file for the current project.
By default, PyCharm shows the manage.py file, located under the Django project root. Click /help/img/idea/2016.3/browseButton.png to select the desired manage file from the file system.
Environment variablesSpecify here the environment variables to be passed to the script.
Commands to skipSpecify here the commands of manage.py which should be skipped.
If some of the manage.py utility commands take too long time to run, a message appears in the manage.py@<project name> tool window, suggesting you to include these commands into the skip list.
Show structureClick this button to show the structure of a Django project:
/help/img/idea/2016.3/py_django_structure.png

The users are advised to look into this window to see whether the Django project structure is correct.

See Also

Language and Framework-Specific Guidelines:

External Links:

Last modified: 23 December 2016