Using compat.string_types instead of "str if compat.py3k else basestring" in TGPlugin.render method.