summaryrefslogtreecommitdiff
path: root/examples/todo/list.py
blob: ecc0cb50416cf6f83100feaa9eb9aaab570990f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from SitePage import SitePage

import api

class list(SitePage):
    def writeContent(self):
        self.write("""<h1>User's List""")
        self.write("""<form action="list" method="post"> <p> <table> <tr> <td>
            <input type="text" name="task"> </input> </td> <td> <input
            type="submit" name="_action_add" value="Add"> </td> </tr> </table>
            </p> </form>""")

    def actions(self):
        return ["add"]

    def add(self):
        """
        your code here
        """
        self.awake(self.request().transaction())
        self.writeHTML()