Navigate between templates and views
Enable the Django plugin
This functionality relies on the Django plugin, which is bundled and enabled in PyCharm by default. If the relevant features are not available, make sure that you did not disable the plugin.
Press Ctrl+Alt+S to open settings and then select
.Open the Installed tab, find the Django plugin, and select the checkbox next to the plugin name.
PyCharm makes it possible to easily navigate between templates and views by using the gutter icons and .
To navigate from a view to a template
Open views.py in the editor.
Click the gutter icon next to the line where the desired template is mentioned:
To navigate from a template to the referencing view
Open the template file in the editor.
Click the gutter icon in the upper-left corner.
If prompted, select the location that you want to navigate to:
Last modified: 01 July 2024