-def normalized_name(view):
-
- @functools.wraps(view)
- def decorated(request, name, *args):
- normalized = normalize_name(name)
- logger.debug('View check %r -> %r', name, normalized)
-
- if normalized != name:
- return http.HttpResponseRedirect(
- reverse('wiki_' + view.__name__, kwargs={'name': normalized}))
-
- return view(request, name, *args)
-
- return decorated
-
-
-@never_cache
-def document_list(request):
- return direct_to_template(request, 'wiki/document_list.html', extra_context={
- 'docs': getstorage().all(),
- 'last_docs': sorted(request.session.get("wiki_last_docs", {}).items(),
- key=operator.itemgetter(1), reverse=True),
- })
-
-