# -*- coding: utf-8 -*-
-############################################################
-# Copyright © 2009 Benoît PIN <pinbe@luxia.fr> #
-# Cliché - http://luxia.fr #
-# #
-# This program is free software; you can redistribute it #
-# and/or modify it under the terms of the Creative Commons #
-# "Attribution-Noncommercial 2.0 Generic" #
-# http://creativecommons.org/licenses/by-nc/2.0/ #
-############################################################
+#######################################################################################
+# Copyright © 2009 Benoît Pin <pin@cri.ensmp.fr> #
+# Plinn - http://plinn.org #
+# #
+# #
+# This program is free software; you can redistribute it and/or #
+# modify it under the terms of the GNU General Public License #
+# as published by the Free Software Foundation; either version 2 #
+# of the License, or (at your option) any later version. #
+# #
+# This program is distributed in the hope that it will be useful, #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
+# GNU General Public License for more details. #
+# #
+# You should have received a copy of the GNU General Public License #
+# along with this program; if not, write to the Free Software #
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #
+#######################################################################################
"""
Pricing types
from AccessControl import ModuleSecurityInfo
from utils import Message as _
from utils import translate
-from Products.globalrequest import getRequest
+from zope.globalrequest import getRequest
msecurity = ModuleSecurityInfo('Products.photoprint.price')
msecurity.declarePublic('Price')
n = str(round(n, 2))
i, d = n.split('.')
ds = _(u'${i}.${d}', mapping={'i':i, 'd':d}, default=n)
- return translate(ds, getRequest()).encode('utf-8')
+ return translate(ds).encode('utf-8')
def getValues(self) :
values = {'value':self._price,