for an example,in hello.py from helloworld project,

def test(self):
        m.subexec('/test.myt')
def say_when(self):
        m.write("The time is <b>"+str(datetime.now())+"</b>")

in templates directory,test.myt is:

<html>
<head>
    <title>ajax test</title>
        <script src="/javascripts/prototype.js"
type="text/javascript"></script>
        <script src="/javascripts/effects.js"
type="text/javascript"></script>
        <script src="/javascripts/dragdrop.js"
type="text/javascript"></script>
        <script src="/javascripts/controls.js"
type="text/javascript"></script>
</head>
<body>
<h1>What time is it?</h1>
<div id="time_div">
  I don't have the time, but
  <% h.link_to_remote( "click here",
       dict(update ="time_div",
            url = h.url(controller="hello",action ="say_when")) %>
  and I will look it up.
</div>
</body>


--~--~---------~--~----~------------~-------~--~----~
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