diff -r f4dec0cca9a1 -r 84468b90e9c1 web/views/urlrewrite.py --- a/web/views/urlrewrite.py Wed Sep 16 11:23:51 2015 +0200 +++ b/web/views/urlrewrite.py Mon Sep 14 16:03:07 2015 +0200 @@ -19,6 +19,8 @@ import re +from six import string_types + from cubicweb.uilib import domid from cubicweb.appobject import AppObject @@ -122,14 +124,14 @@ required_groups = None if required_groups and not req.user.matching_groups(required_groups): continue - if isinstance(inputurl, basestring): + if isinstance(inputurl, string_types): if inputurl == uri: req.form.update(infos) break elif inputurl.match(uri): # it's a regexp # XXX what about i18n? (vtitle for instance) for param, value in infos.items(): - if isinstance(value, basestring): + if isinstance(value, string_types): req.form[param] = inputurl.sub(value, uri) else: req.form[param] = value @@ -222,7 +224,7 @@ required_groups = None if required_groups and not req.user.matching_groups(required_groups): continue - if isinstance(inputurl, basestring): + if isinstance(inputurl, string_types): if inputurl == uri: return callback(inputurl, uri, req, self._cw.vreg.schema) elif inputurl.match(uri): # it's a regexp