I have a SQLFORM.grid containing :
grid = SQLFORM.grid(
query=queryInstalled,
fields=[db.e5systemstatus.id,
db.e5systemstatus.patch,
db.e5systemstatus.patchstatus,
db.e5systemstatus.patchattempted,
db.e5systemstatus.patchsummary,
],
headers = {
'e5systemstatus.id' : 'ID',
'e5systemstatus.patch' : 'Patch',
'e5systemstatus.patchstatus' : 'Installed?',
'e5systemstatus.patchattempted' : 'Attempted?',
'e5systemstatus.patchsummary' : 'Summary',
},
create=False,
deletable=allowEdit,
editable=allowEdit,
formstyle='table3cols',
paginate=10
)
The model says:
db.define_table(
'e5systemstatus',
Field('system_id',db.e5system),
Field('patch',length=12, label='Patch'),
Field('prereq',length=512, label='Prereq'),
Field('patchstatus','boolean',default=False,label='Status'),
Field('patchlog','text',label='Log'),
....
The problem comes on the 'text' column.
When the grid goes to 'View' mode, the 'text' column looks like it has the
line endings stripped. It comes out like this:
Java version = 1.7.0_71 Java vendor = Oracle Corporation Java OS name =
Linux Java OS arch = amd64 Java OS version = 3.10.66-1.el6.elrepo.x86_64
Java version = 1.7.0_71 Java vendor = Oracle Corporation Java OS name =
Linux Java OS arch = amd64 Java OS version = 3.10.66-1.el6.elrepo.x86_64
Fri Feb 6 11:42:13 GMT 2015 Result was 0 Database Available... Continuing
Verifying archive
Which isn't very readable. In 'edit' mode, it comes out as:
Java version = 1.7.0_71
Java vendor = Oracle Corporation
Java OS name = Linux
Java OS arch = amd64
Java OS version = 3.10.66-1.el6.elrepo.x86_64
Java version = 1.7.0_71
Java vendor = Oracle Corporation
Java OS name = Linux
Java OS arch = amd64
Java OS version = 3.10.66-1.el6.elrepo.x86_64
Fri Feb 6 11:42:13 GMT 2015
Result was 0
Database Available... Continuing
So the question is, how can I make this 'text' column display correctly in
'View' mode ?
The column contains the captured stdout from an operating system command,
so it's text with line breaks.
Thanks
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.