mjbrownie / vim-htmldjango_omnicomplete

htmldjango filetype omnicomplete - completes template tags/filters/variables
26 stars 5 forks source link

TEMPLATE_DIRS deprecated sience Django 1.8 #10

Closed Shtucer closed 8 years ago

Shtucer commented 9 years ago

I've tried to fix it in get_template_names().

def get_template_names(pattern):
    dirs = mysettings.TEMPLATE_DIRS + app_template_dirs
    if hasattr(mysettings, "TEMPLATES"):
        # For Django 1.8
        for d in [e["DIRS"] for e in mysettings.TEMPLATES]:
            dirs += tuple(d)
mjbrownie commented 9 years ago

Thanks for that..

mysettings.TEMPLATE_DIRS

should be checked with hasattr as well if it is getting depreciated. I'll merge it when I can but if you could make a pull request it would be great.

mjbrownie commented 8 years ago

Added in 5e9b8b5

Shtucer commented 8 years ago

Sorry, I was busy. Note, Django 1.8 has Jinja2 template engine as well as DjangoTemplate. Perhaps this is not important, just to keep in mind. And finaly, pay attention to previous issue.