Re: Invalid block tag with Inclusion Tag
Don't you need to reference it by the function name: "show_popular_keywords"?
On Sat, May 11, 2013 at 2:26 AM, <neil@vidyasource.com> wrote:
I am attempting to create a fairly straightforward inclusion tag out of nothing more than a hardcoded dictionary of keywords. My app is set up like this:appskeywordstemplatetags__init__.pypopular_keyword_tags.py__init__.py__init__.pyI have included "apps.keywords" in settings.py.The module file popular_keyword_tags.py looks like this:register = template.Library()@register.inclusion_tag('keywords/popular_keywords.html')def show_popular_keywords():popular_keyword_dict = dict()...return {'popular_keywords': popular_keyword_dict}In the template where I want to use the tag, I have this:{% load pages_tags mezzanine_tags i18n future staticfiles popular_keyword_tags %}Then finally I use the tag like this:
{% popular_keywords %}I feel like I have set everything up correctly, but I can't shake this "Invalid block tag: 'popular_keywords'" error.Any help you can provide is appreciated. Let me know if I need to provide any more information.Thanks.--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home