@register.assignment_tag<EOL>def recent_articles(limit=<NUM_LIT:10>, exclude=None):
queryset = Article.objects.filter(published=True).order_by('<STR_LIT>')<EOL>if exclude:<EOL><INDENT>if hasattr(exclude, '<STR_LIT>'):<EOL><INDENT>queryset = queryset.exclude(pk__in=exclude)<EOL><DEDENT>else:<EOL><INDENT>queryset = queryset.exclude(pk=exclude)<EOL><DEDENT><DEDENT>return queryset<EOL>
Returns list of latest article