def save(request, name): name = unquote(name) wiki.set_page(name, request.input()['text']) redirect("/view/%s" % quote(name))
def view(request, name): name = unquote(name) template("view", name=name, text=Wiki.format(wiki.get_page(name), lambda n: "/view/%s" % quote(n)))
def save(request, name): name = unquote(name) wiki.set_page(name, request.POST['text']) raise Redirect("/view/%s" % quote(name))
def save(request): if request.method != 'POST': return newf.Response(status_code=405) name = request.POST.getfirst('name') wiki.set_page(name, request.POST.getfirst('text')) return newf.ResponseRedirect("/view/%s" % quote(name))
def POST(self, name): name = unquote(name) wiki.set_page(name, self.request.POST.getfirst('text')) return mnml.HttpResponseRedirect("/view/%s" % quote(name))
def GET(self, name): name = unquote(name) return template("view", name=name, text=Wiki.format(wiki.get_page(name), lambda n: "/view/%s" % quote(n)))