Don't you need to reference it by the function name:
"show_popular_keywords"?


On Sat, May 11, 2013 at 2:26 AM, <[email protected]> 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:
>
> *apps*
> *  keywords*
> *    templatetags*
> *        __init__.py*
> *        popular_keyword_tags.py*
> *    __init__.py*
> *  __init__.py*
>
> I 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 [email protected].
> To post to this group, send email to [email protected].
> 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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to