Web development with Python 3.1

Rami Chowdhury rami.chowdhury at gmail.com
Wed Oct 28 16:46:31 EDT 2009


On Wed, 28 Oct 2009 12:42:17 -0700, Dotan Cohen <dotancohen at gmail.com>  
wrote:

>> I've already given you that for TG:
>>
>> class RootController(BaseController):
>>
>>   @expose()
>>   def page(self, torwalds=None):
>>       return "<html><body><p>%s</p></body></html>" % (torwalds if  
>> torwalds
>> else ""
>>
>
> Does return mean that this could not be used in the middle of a page?
>
[snip]
> Yes, I like to separate HTML from code. However, often I need to
> output something in the middle of the page. How could I do that with a
> template?
>

What do you mean by "in the middle of the page"? Do you mean, for  
instance, the behavior of "middle.php" in the following PHP example:

<?php

include_once("beginning.inc.php");

include_once("middle.php");

include_once("end.inc.php");

?>

Is that what you are after?



-- 
Rami Chowdhury
"Never attribute to malice that which can be attributed to stupidity" --  
Hanlon's Razor
408-597-7068 (US) / 07875-841-046 (UK) / 0189-245544 (BD)



More information about the Python-list mailing list