Beispiel #1
0
def edit(page):
    s = open(page).read() if os.path.exists(page) else ""
    s = '<form method="post" action="?save">' \
        '<textarea name="content" rows="10" cols="80">%s</textarea><br>' \
        '<input type="submit">' \
        '</form>' % s
    return template(wiki, name=name(page), content=s)
Beispiel #2
0
def view(page):
    print displayname(page)
    return template(wiki, name=name(page), content=open(page).read())