[gen] Pod fields can now be configured with several templates.
This commit is contained in:
parent
889289407f
commit
ecc3a8c39b
10 changed files with 175 additions and 122 deletions
|
@ -797,14 +797,12 @@ class AbstractWrapper(object):
|
|||
zopeObj.reindex()
|
||||
return appyObj
|
||||
|
||||
def freeze(self, fieldName, doAction=False):
|
||||
def freeze(self, fieldName):
|
||||
'''This method freezes a POD document. TODO: allow to freeze Computed
|
||||
fields.'''
|
||||
rq = self.request
|
||||
field = self.o.getAppyType(fieldName)
|
||||
if field.type != 'Pod': raise 'Cannot freeze non-Pod field.'
|
||||
# Perform the related action if required.
|
||||
if doAction: self.request.set('askAction', True)
|
||||
# Set the freeze format
|
||||
rq.set('podFormat', field.freezeFormat)
|
||||
# Generate the document.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue