@register.inclusion_tag('zinnia/tags/dummy.html', takes_context=True)
def get_similar_entries(context, number=5, template='zinnia/tags/entries_similar.html'):
 entry = context.get('entry')
 if (not entry):
  return {'template': template, 'entries': []}
 vectors = EntryPublishedVectorBuilder()
 entries = vectors.get_related(entry, number)
 return {'template': template, 'entries': entries}

@ register . inclusion_tag ( 'zinnia/tags/dummy.html' , takes_context = True ) def get_similar_entries ( context , number = 5 , template = 'zinnia/tags/entries_similar.html' ) : entry = context . get ( 'entry' ) if ( not entry ) : return { 'template' : template , 'entries' : [ ] } vectors = EntryPublishedVectorBuilder ( ) entries = vectors . get_related ( entry , number ) return { 'template' : template , 'entries' : entries }
return similar entries .