Part 6. Django-specific navigation
Finally, you will explore the Django-specific navigation.
Note that same type of navigation is available for the other frameworks, such as Pyramid and Flask.
Use the example from the "first steps" guide Create and run your first Django project.
Open the file views.py for editing F4. In the gutter, next to the line template_name = "polls/index.html"
, you see the icon .
Hovering over this icon reveals the following popup:

Clicking this icon results in jumping directly to the template index.html, that resides in the folder polls under templates:

In the gutter of the template file index.html, you see the icon . If you hover over this icon, you'll see the following popup:

Clicking this icon leads you directly to the corresponding view.
PyCharm allows you to easily navigate between a particular view and the corresponding url. This is how it's done:
Hover over the view name, while keeping Ctrl key pressed, and see the view name turning into a hyperlink:
If you click this hyperlink, you'll jump directly to the corresponding URL:
Vice versa, you can also jump from a URL to the corresponding view. Again, in the urls.py file, hover over the view name, while keeping Ctrl key pressed, and see the view name turning into a hyperlink.
CtrlClick the view name - and find yourself in the corresponding view.
By the way, if you click a pin icon in the popup, this popup becomes "pinned" - that is, turns into a tool window:

In a Django project, you see the same icons and
as in a pure Python project. When you hover over such an icon, you see a popup, like the following:

You can also jump to a declaration or implementation of a symbol. To do that, just place the caret at the implementing/overriding symbol and press Ctrl0B or CtrlAlt0B (or choose Navigate | Declaration or Usages or Navigate | Implementation from the main menu):

Django applications can be tested same as the pure Python ones. Same way you can create tests for the Django projects, for example, press CtrlShift0T:

Fill in the form in the Create test dialog:

You'll see the code like:
from unittest import TestCase
class TestQuestion(TestCase):
def test_was_published_recently(self):
self.fails()
The test class naturally fails, but it's up to you to write some meaningful code.
This brief tutorial is over. You've mastered the following features:
Used the gutter icons to navigate between views and templates.
Navigated between views and urls.
Repeated how to jump to an implementation or declaration.
Repeated how to navigate to an existing test or create a new one.
Thanks for your feedback!