@block_user_agents
@require_GET
def documents(request, tag=None):
 tag_obj = None
 if tag:
  matching_tags = get_list_or_404(DocumentTag, name__iexact=tag)
  for matching_tag in matching_tags:
   if (matching_tag.name.lower() == tag.lower()):
    tag_obj = matching_tag
    break
 docs = Document.objects.filter_for_list(locale=request.LANGUAGE_CODE, tag=tag_obj)
 paginated_docs = paginate(request, docs, per_page=DOCUMENTS_PER_PAGE)
 context = {'documents': paginated_docs, 'count': docs.count(), 'tag': tag}
 return render(request, 'wiki/list/documents.html', context)

@ block_user_agents @ require_GET def documents ( request , tag = None ) : tag_obj = None if tag : matching_tags = get_list_or_404 ( DocumentTag , name__iexact = tag ) for matching_tag in matching_tags : if ( matching_tag . name . lower ( ) == tag . lower ( ) ) : tag_obj = matching_tag break docs = Document . objects . filter_for_list ( locale = request . LANGUAGE_CODE , tag = tag_obj ) paginated_docs = paginate ( request , docs , per_page = DOCUMENTS_PER_PAGE ) context = { 'documents' : paginated_docs , 'count' : docs . count ( ) , 'tag' : tag } return render ( request , 'wiki/list/documents.html' , context )
list wiki documents depending on the optionally given tag .