#NEWLINE# @ register . as_tag #NEWLINE# def blog_authors( * args ) : #NEWLINE# #INDENT# '\n    Put a list of authors (users) for blog posts into the template context.\n    ' #NEWLINE# blog_posts = BlogPost . objects . published ( ) #NEWLINE# authors = User . objects . filter ( blogposts__in = authors ) #NEWLINE# return list ( authors . annotate ( post_count = Count ( 'blogposts' ) ) )