When I have data from sqlite printing out to python shell such as from this
code:
import sqlite 3
code
def trial_stuff()
style = [ 'string',....]
id = record[0]
place = record[5]
if item in string == id:
print place
*In an example data, the result appears as this:*
Foot complications are among the most serious and costly complications of
diabetes mellitus.
Amputation of the lower extremity or part of it is usually preceded by a
foot ulcer.
A strategy that includes prevention, patient and staff education,
multidisciplinary treatment of foot ulcers, and close monitoring can
reduce amputation rates by 49–85%.
Therefore, several countries and organizations, such as the World Health
Organization and the International Diabetes Federation, have set goals to
reduce the rate of amputations by up to 50%.
*When printing in web2py view:*
*in controller:*
code......
result = trial_stuff()
*in view.html:*
{{extend.layout.html}}
{{Answer:}}
{{=result}}
This is what I get on view:
Answer:
Foot complications are among the most serious and costly complications of
diabetes mellitus. Amputation of the lower extremity or part of it is
usually preceded by a foot ulcer.A strategy that includes prevention,
patient and staff education, multidisciplinary treatment of foot ulcers,
and close monitoring can reduce amputation rates by 49–85%. Therefore,
several countries and organizations, such as the World Health Organization
and the International Diabetes Federation, have set goals to reduce the
rate of amputations by up to 50%.
Is there a better way of doing it on web2py and space out my answer on view
like it does on shell?
Kind regards
--
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.