Named URL tags in Django templates
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 provides extensive support for the named url tags. This support includes:
Django inspection that checks whether the required arguments are passed correctly to a
{% url %}
tag:Django inspection checks argument values against regexp groups and adds warning if a group does not match:
Suggestion list on code completion includes names for the named arguments (if any):
Ability to navigate to an appropriate path by pressing Ctrl+B on a url argument: