Didn't mean to send it. In my template I'm using this to call the
recent news:

{% load recent_news %}
{% get_news_list %}

I'm getting a TemplateSyntaxError, 'recent_news' is not a valid tag
library: Could not load template library from
django.templatetags.recent_news, No module named recent_news

On Jul 3, 10:33 am, [EMAIL PROTECTED] wrote:
> On my homepage I want to have a few different items, one is the recent
> news items. I created the recentnews.py file:
>
> from myproject.site.models import Blog
> from django.template import Library,Node
>
> register = Library()
>
> def build_news_list(parser, token):
>
>     return NewsObject()
>
> class NewsObject(Node):
>     def render(self, context):
>         context['recent_news'] = Entry.entry_live.all().order_by('-
> pub_date')[:15  ]
>         return ''
>
> register.tag('get_news_list', build_news_list)
>
> For some reason I can't remember/figure out where this file, with the
> __init__.py file. I was thinking it was in /myproject/templates/
> templatetags/ but that isn't working.
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to