Django Sekizai Template Tags in PyCharm are unresolved

362 views Asked by At

Pycharm usually auto-completes template tags like static or block yet fails to recognize the Sekizai tags like render_block. These are marked as unresolved. I've observed the same thing with djangoCMS tags like cms_toolbar. None of these tags are resolved, let alone auto-completed.

Even so they work fine it would be great to have them working well with PyCharm. All these unresolved messages are ugly at best.

Why are these template tags behaving like that? Is there a way to "activate" these tags in PyCharm?

Versions:

  • Pycharm Professional 3.4.1
  • Django 1.6.5
  • DjanogCMS 3.0.3
  • django-sekizai 0.7
1

There are 1 answers

0
thebjorn On

It looks like sekizai_tags is implemented in terms of django-classytags which does a lot of funky stuff with meta-classes etc. I'm guessing PyCharm parses the text of the sekizai files (as opposed to importing them and inspecting the namespace), which makes it quite difficult to figure out what names are available.