[Answer]-Is there a way to load Django template modules from code instead of templates?

1👍

✅

This is undocumented feature but it works:

from django.template import add_to_builtins
add_to_builtins('django.templatetags.static')

The code above is for django 1.7. For previous version of django you should import add_to_builtins from django.template.loader.

Leave a comment