+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
+
+