web/views/urlrewrite.py
changeset 10688 fa29f3628a1b
parent 10612 84468b90e9c1
--- a/web/views/urlrewrite.py	Wed Sep 16 11:28:07 2015 +0200
+++ b/web/views/urlrewrite.py	Wed Sep 16 13:57:21 2015 +0200
@@ -19,7 +19,7 @@
 
 import re
 
-from six import string_types
+from six import string_types, add_metaclass
 
 from cubicweb.uilib import domid
 from cubicweb.appobject import AppObject
@@ -53,6 +53,7 @@
         return super(metarewriter, mcs).__new__(mcs, name, bases, classdict)
 
 
+@add_metaclass(metarewriter)
 class URLRewriter(AppObject):
     """Base class for URL rewriters.
 
@@ -66,7 +67,6 @@
     should be tried first. The higher the priority is, the earlier the
     rewriter will be tried.
     """
-    __metaclass__ = metarewriter
     __registry__ = 'urlrewriting'
     __abstract__ = True
     priority = 1