composer: some more Python3 fixes
This commit is contained in:
parent
71f36283b9
commit
ee82ee7b32
2 changed files with 6 additions and 23 deletions
|
@ -405,16 +405,16 @@ class ListFieldInstance(FieldInstance):
|
||||||
if isinstance(value, str):
|
if isinstance(value, str):
|
||||||
return value
|
return value
|
||||||
if value is None:
|
if value is None:
|
||||||
return u''
|
return ''
|
||||||
return u'\n'.join(unicode(self.valueFieldInstance.marshall(v)) for v in value)
|
return '\n'.join(self.valueFieldInstance.marshall(v) for v in value)
|
||||||
#return [self.valueFieldInstance.marshall(v) for v in value]
|
#return [self.valueFieldInstance.marshall(v) for v in value]
|
||||||
|
|
||||||
def display(self, value):
|
def display(self, value):
|
||||||
if not value:
|
if not value:
|
||||||
return u''
|
return ''
|
||||||
if isinstance(value, str):
|
if isinstance(value, str):
|
||||||
return value
|
return value
|
||||||
return u' | '.join(unicode(self.valueFieldInstance.display(v)) for v in value)
|
return ' | '.join(self.valueFieldInstance.display(v) for v in value)
|
||||||
|
|
||||||
def unmarshall(self, value):
|
def unmarshall(self, value):
|
||||||
if isinstance(value, str):
|
if isinstance(value, str):
|
||||||
|
|
|
@ -1,23 +1,6 @@
|
||||||
#
|
# cybertools.composer.schema.grid.interfaces
|
||||||
# Copyright (c) 2013 Helmut Merz helmutm@cy55.de
|
|
||||||
#
|
|
||||||
# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
#
|
|
||||||
|
|
||||||
"""
|
""" Grid field definition.
|
||||||
Grid field definition.
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from zope import schema
|
from zope import schema
|
||||||
|
|
Loading…
Add table
Reference in a new issue