PyCharm Django project with Jinja2 templates - no named URL tags or navigation

Hi,

 

We migrated our Django project to use Jinja2 templates, but now don't get Django specific autocompletion (it worked before on Django's own template language). For example (the big one) when we create named url tags the route name isn't suggested.

 

    {{ url('some_route')  }}

 

These are the 2 key features which are no longer working. Normal Jinja2 tags such as `{% extends ... %}` etc work ok, so PyCharm certainly knows the files are Jinja2. It seems to be just the Django specific stuff which isn't working.

- https://www.jetbrains.com/help/pycharm/completion-and-navigation-for-named-url-tags-in-django-templates.html#

- https://www.jetbrains.com/help/pycharm/part-6-framework-specific-navigation.html#

 

Does anyone have any suggestions? I've trawled through settings and set everything in the way in which I think should work. I'm using PyCharm Professional.

 

Thanks for your help.

1 comment
Comment actions Permalink

Hi,

I think it should work, since we support Jinja2 templates for Django.

Could you provide a project example that reproduces the issue?

0

Please sign in to leave a comment.