Hi everyone
I wrote a small templatetags library (just one tag), put it
into
existing app directory (into subdirectory templatetags),
added
__init__.py there but after I added to my templates:
{% load "news_tags" %}
{% latest_news %}
django shows me an error:
'"news_tags"' is not a valid tag library:
Could not load template
library from django.templatetags."news_tags", No
module named
"news_tags"
After a bit of research I found that my templatetags dir has
__init__.pyc file and it tells me that django tried to
include this
directory but my news_tags.py file has no .pyc
Where may I be wrong ?
P.S. the idea is to put 2 latest news items on all pages
using custom
template tag in base.html (base template)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-users googlegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribe googlegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---
|