ssidorenko
ssidorenko

Reputation: 140

Django cannot find custom template tags

I've created a templatetags folder within my app, with an __init__.py + active.py inside it, and Django can't find it, even if the app is in INSTALLED_APPS:

''active'' is not a valid tag library: Template library 'active' not found, tried
django.templatetags.'active',website.home.templatetags.'active',
django_extensions.templatetags.'active',django.contrib.flatpages.templatetags.'active',
django.contrib.staticfiles.templatetags.'active',
django.contrib.admin.templatetags.'active'

Upvotes: 0

Views: 1039

Answers (1)

arie
arie

Reputation: 18972

You probably tried to load you template tags like this:

{% load 'active_tags' %}

Try this instead:

{% load active_tags %}

Upvotes: 2

Related Questions