From c182b89425a5be93641cd8f5bb00ea1e88f23a79 Mon Sep 17 00:00:00 2001 From: Christophe de Vienne Date: Thu, 11 Apr 2013 11:40:13 +0200 Subject: [PATCH] Allow a wsme.types.Base child class to override the default 'wsattr' class by having a __wsattrclass__ class attribute --- wsme/types.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wsme/types.py b/wsme/types.py index b33bb87..88f0559 100644 --- a/wsme/types.py +++ b/wsme/types.py @@ -434,7 +434,7 @@ def inspect_class(class_): or isinstance(attr, list) or isinstance(attr, dict)): register_type(attr) - attrdef = wsattr(attr) + attrdef = getattr(class_, '__wsattrclass__', wsattr)(attr) attrdef.key = name if attrdef.name is None: