diff --git a/build_js.sh b/build_js.sh index 9b5b3c9..9038596 100755 --- a/build_js.sh +++ b/build_js.sh @@ -39,6 +39,10 @@ for f in eos.js_tests; do # Transcrypt bug #407 perl -0777 -pi -e 's/property.call \((.*?), \g1.\g1.__impl__(.*?)\)/property.call ($1, $1.__impl__$2)/g' eos/__javascript__/$f.js perl -0777 -pi -e 's/property.call \((.*?), \g1.\g1.__implpy_(.*?)\)/property.call ($1, $1.__impl__$2)/g' eos/__javascript__/$f.js + + # Transcrypt bug #387 + perl -0777 -pi -e 's/var __nest__ = function \(headObject, tailNames, value\) \{/var __nest__ = function (headObject, tailNames, value) { if (headObject === __all__ && value.__all__) { value.__all__.__module__ = tailNames; }/g' eos/__javascript__/$f.js + perl -0777 -pi -e "s/var (.*?) = __class__ \('\g1', \[(.*?)\], \{/var "'$1'" = __class__ ('"'$1'"', ["'$2'"], { __module__: __all__.__module__,/g" eos/__javascript__/$f.js done cp eos/__javascript__/eos.js_tests.js eosweb/core/static/js/eosjs.js diff --git a/eos/core/objects/__init__.py b/eos/core/objects/__init__.py index 2ccf871..16a8f4a 100644 --- a/eos/core/objects/__init__.py +++ b/eos/core/objects/__init__.py @@ -170,7 +170,7 @@ class DateTimeField(Field): class EosObjectType(type): def __new__(meta, name, bases, attrs): cls = type.__new__(meta, name, bases, attrs) - cls._name = ((cls.__module__ if is_python else meta.__next_class_module__) + '.' + cls.__name__).replace('.js.', '.').replace('.python.', '.') #TNYI: module and qualname + cls._name = (cls.__module__ + '.' + cls.__name__).replace('.js.', '.').replace('.python.', '.') #TNYI: qualname if name != 'EosObject': EosObject.objects[cls._name] = cls if '_db_name' not in attrs: