pythondjangopycharmtemplatetag

PyCharm Complaining about Django `templatetag` Argument


Here is a snippet of code in a template that uses a custom templatetag I wrote that does work:

{% if theme == 'books_literature' %}
    {{ theme|prettify:'/' }}
{% else %}
    {{ theme|prettify:' ' }}
{% endif %}

PyCharm is complaining about the colon and the characters after the colon, even though they are valid...

Here is an image showing what it looks like:

enter image description here

The hover I get says I should add closing curly braces... Which makes sense, if it wasn't expecting an argument.


Solution

  • @thebjorn reported it as PY-14890 ( https://youtrack.jetbrains.com/issue/PY-14890 )