def set_page(name): if not Page.exists(name): abort(404) content = request.form['content'] #TODO: sanitize! Page.set(name, content) return 'ok'