percious  committed 2206b13

added support for local: in the dotted template lookup (for plugins)
added support for jsonification to disploy MultiDicts
removed logging statements for i18n

  • Participants
  • Parent commits a058dd7

Comments (0)

Files changed (3)

File tg/

         the value we are given without any change.
+        if uri.startswith('local:'):
+            uri = uri.replace('local:', tg.config['pylons.package']+'.')
         if '.' in uri:
             # We are in the DottedTemplateLookup system so dots in
             # names should be treated as a Python path. Since this
         if template.filename is None:
             return template
         if not os.path.exists(template.filename):
             # remove from cache.
     languages should be a string or a list of strings.
     First lang will be used as main lang, others as fallbacks.
+    # the logging to the screen was removed because
+    # the printing to the screen for every problem causes serious slow down.
     except LanguageError:
-        log.warn("Language %s: not supported", languages)
+        pass
+        #log.warn("Language %s: not supported", languages)
     except LanguageError:
-        log.warn("Language %s: not supported by FormEncode", languages)
+        pass
+        #log.warn("Language %s: not supported by FormEncode", languages)
 def set_lang(languages, **kwargs):

File tg/

     return hasattr(obj, '_sa_class_manager')
 from sqlalchemy.engine.base import ResultProxy, RowProxy
+from webob import MultiDict
 # JSON Encoder class
             return props
         elif isinstance(obj, ResultProxy):
             return list(obj)
+        elif isinstance(obj, MultiDict):
+            return obj.mixed()
         elif isinstance(obj, RowProxy):
             return dict(obj)