From 993a08776ce39a4a94f78a3b675e4ebd652abb4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 26 Jul 2012 11:30:40 +0200 Subject: [PATCH] Import pyson locally to not break installation issue2705 review450001 (transplanted from 433368c5f09898fced213c19da8c82741d9caab0) --- proteus/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/proteus/__init__.py b/proteus/__init__.py index 0c174c4304..369a177dce 100644 --- a/proteus/__init__.py +++ b/proteus/__init__.py @@ -10,7 +10,6 @@ import threading import datetime from decimal import Decimal import proteus.config -from proteus.pyson import PYSONDecoder _MODELS = threading.local() @@ -707,6 +706,8 @@ class Model(object): def _on_change(self, name): 'Call on_change for field' + # Import locally to not break installation + from proteus.pyson import PYSONDecoder definition = self._fields[name] if definition.get('on_change'): if isinstance(definition['on_change'], basestring):