List Info

Thread: is there an alternative to generating html content via function return values?




is there an alternative to generating html content via function return values?
user name
2006-04-11 14:29:29
I'm just starting to use cherrypy, from what I understand
exposed
functions
generate html content by returning a string. Is there
another way to
send
html content back to the user?

Sometimes I find that I want to use function return values
for my own
application and needing to return a string makes that a bit
unnatural.

Thanks for any info.
-Ram


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-usersgooglegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribegooglegroups.com
For more options, visit this group at http://
groups.google.com/group/cherrypy-users
-~----------~----~----~----~------~----~------~--~---

is there an alternative to generating html content via function return values?
user name
2006-04-11 21:05:22
There certainly is another way.  You might like to look at
the way that
TurboGears [1] uses Kid templates (linked to CherryPy by
means of an "expose"
decorator) to generate HTML.  Once you figure how that
works, all sorts of other
possibilities might come to mind.

A beauty of the TurboGears approach, IMO, is that it
provides a "full stack"
environment without burying all the cool things that
CherryPy can do within the
framework.

#g
--

[1] http://www.turbogears.org/


Ram wrote:
> I'm just starting to use cherrypy, from what I
understand exposed
> functions
> generate html content by returning a string. Is there
another way to
> send
> html content back to the user?
> 
> Sometimes I find that I want to use function return
values for my own
> application and needing to return a string makes that a
bit unnatural.
> 
> Thanks for any info.
> -Ram
> 
> 
> > 

-- 
Graham Klyne
For email:
http://www.ninebyn
ine.org/#Contact


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-usersgooglegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribegooglegroups.com
For more options, visit this group at http://
groups.google.com/group/cherrypy-users
-~----------~----~----~----~------~----~------~--~---

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )