Django template IntelliSense doesn't understand simple_tag


If you register a tag like this:
# mytags.py
import datetime
from django import template

register = template.Library()

def my_current_time(format_string):
    return datetime.datetime.now().strftime(format_string)
Then use it:
# details.html
{% load mytags %}
{% <check this completion list
It doesn't show up in IntelliSense in the template editor. If you replace simple_tag with tag or assignment_tag, it shows up in completions as expected.

Note: When testing this, it's best to close/reopen the solution after changing the tag code, in order to avoid false positives. I found that if you make it tag or assignment_tag then change it to simple_tag without reloading, it will still show up in completions. But it won't after you reload the solution.

Closed May 15 at 9:32 PM by huguesv