On Apr 28, 2006, at 6:49 AM, sjol wrote:

>
> Thank you for the tutorial. I do have another question though :
> how come I cannot issue m.subexec() or m.comp() for a myghty template
> that contains code I am using ajax call to update a div ?

I am not sure if i really follow you. Because you can use them both  
but you generally do not want to use the m.subexec() as this would  
also call the autohandler. With the result that the div you want to  
update will contain the complete html 'framework'.

However m.comp would work just fine, you could change the tutorial  
like this:

------ controller/ping.py:

from ping.lib.base import *
import datetime

class PingController(BaseController):
     def index(self):
         m.subexec('/ping.myt')

     def pong(self):
        c.time = datetime.datetime.now()
        m.comp('/pong.myt')

------ create templates/pong.myt:

<center>
    pong!
    <br/>
    <% c.time %>
</center>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss
-~----------~----~----~----~------~----~------~--~---

Reply via email to