(self)
| 271 | path = "/addbook" |
| 272 | |
| 273 | def GET(self): |
| 274 | d = {"type": web.ctx.site.get("/type/edition")} |
| 275 | |
| 276 | i = web.input() |
| 277 | author = i.get("author") and web.ctx.site.get(i.author) |
| 278 | if author: |
| 279 | d["authors"] = [author] |
| 280 | |
| 281 | page = web.ctx.site.new("", d) |
| 282 | return render.edit(page, self.path, "Add Book") |
| 283 | |
| 284 | def POST(self): |
| 285 | from infogami.core.code import edit |