def _get_top_docs(count):
 top_qs = WikiDocumentVisits.objects.select_related('document').filter(period=LAST_90_DAYS).order_by('-visits')[:count]
 return [v.document for v in top_qs]

def _get_top_docs ( count ) : top_qs = WikiDocumentVisits . objects . select_related ( 'document' ) . filter ( period = LAST_90_DAYS ) . order_by ( '-visits' ) [ : count ] return [ v . document for v in top_qs ]
get the top documents by visits .