[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
|
@ -120,12 +120,10 @@ class ToolMixin(BaseMixin):
|
|||
# An error has occurred, and p_res contains the error message
|
||||
obj.say(res)
|
||||
return self.goto(rq.get('HTTP_REFERER'))
|
||||
# res contains a FileWrapper instance.
|
||||
response = rq.RESPONSE
|
||||
response.setHeader('Content-Type', res.mimeType)
|
||||
response.setHeader('Content-Disposition',
|
||||
'inline;filename="%s"' % res.name)
|
||||
return res.content
|
||||
# res contains a FileInfo instance.
|
||||
res.writeResponse(rq.RESPONSE)
|
||||
# (Try to) delete the temp file on disk.
|
||||
res.removeFile()
|
||||
|
||||
def getAppName(self):
|
||||
'''Returns the name of the application.'''
|
||||
|
|
|
@ -689,6 +689,7 @@ class BaseMixin:
|
|||
'''Returns the database value of field named p_name for p_self.'''
|
||||
if layoutType == 'search': return # No object in search screens.
|
||||
field = self.getAppyType(name)
|
||||
if field.type == 'Pod': return
|
||||
if '*' not in name: return field.getValue(self)
|
||||
# The field is an inner field from a List.
|
||||
listName, name, i = name.split('*')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue