-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

hi,

i'm about to finish a small piece of code that will display all rows in
a table of your choice, with the option to also add, delete and update
rows through ajax.

hope to publish this today or tomorrow.

alex

SMERSH009 wrote:
> Hi All,
> I am trying to display Data from a database table to display in a
> Table format.
> Right now the results are just being bunched up together. For example,
> when displayed in the web browser the ${ids} returns 1922  instead of
> 19
> 22
> Now I know that this seems like a basic question, but I looked all
> over the tutorials, and they seem to concentrate on displaying ALL the
> data at once, and not to display one row at a time.
> 
> model.py contains:
> 
> class WebAppPages(SQLObject):
>     class sqlmeta:
>         style=Style(longID=True)
>         idName='pageID'
> 
>     pageName= UnicodeCol()
>     url = UnicodeCol(notNone=True)
>     post = BoolCol(default=False)
> 
> controllers.py contains. And I am sure this is wrong...:
> 
> class Root(controllers.RootController):
>     @expose(template="formstutorial.templates.index")
>     def index(self):
>         result= WebAppPages.select()
>         names = map(lambda x: x.pageName ,list(result))
>         urls = map(lambda x: x.url , list(result))
>         ids = map(lambda x: x.id , list(result))
>         return dict(names=names,urls=urls,ids=ids)
> 
> index.kid contains:
> 
> <html>
> <head><title>Webapptests</title></head>
> <body>
> 
> ${urls}
> ${names}
> ${ids}
> </body>
> </html>
> 
> 
> Thank you!
> 
> 
> > 
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQCVAwUBRooEJdpwN1sq38njAQL7OwP6A9wBXY4ILqZicxBX+9e3vGO/JsdKVOhS
lJHkE9iMizci6lPEbNczpYNqLLRw1sPB7R46UwWq3xKccfwX/PbITc3nHJred3bB
KK32cuBVezweeScm9Qc367/8EaCEy2Sswo6yW0pG5+Oje0qvIzxBjKE7zfC0DoCF
/CcEmP6SxIM=
=cvPo
-----END PGP SIGNATURE-----

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to