From: Benoît Pin Date: Tue, 31 Mar 2015 13:14:53 +0000 (+0200) Subject: Ajout fonction utilitaire json_dumps X-Git-Url: https://scm.cri.ensmp.fr/git/Plinn.git/commitdiff_plain/2adcc44a594a9c623ae21ce1a010752ee87ed88e?ds=sidebyside;hp=ad4c6105361622bfda868dd207691eadb62094e2 Ajout fonction utilitaire json_dumps --- diff --git a/Products/Plinn/utils.py b/Products/Plinn/utils.py index f15fd09..15536b0 100755 --- a/Products/Plinn/utils.py +++ b/Products/Plinn/utils.py @@ -24,10 +24,10 @@ import string import re -from types import StringType from random import randrange from Acquisition import aq_base from quopri import encodestring +from json import dumps as json_dumps from zope.globalrequest import getRequest from AccessControl.PermissionRole import rolesForPermissionOn from AccessControl import ModuleSecurityInfo @@ -49,6 +49,8 @@ _marker = [] security = ModuleSecurityInfo( 'Products.Plinn.utils' ) +security.declarePublic('json_dumps') + security.declarePublic('thisObjectComeFromPortalSkin') def thisObjectComeFromPortalSkin(ob, portal=None): """ check if ob comes from portal_skins """