Exemplo n.º 1
0
    def GET(self):
        d = {'type': web.ctx.site.get('/type/edition')}

        i = web.input()
        author = i.get('author') and web.ctx.site.get(i.author)
        if author:
            d['authors'] = [author]
        
        page = web.ctx.site.new("", d)
        return render.edit(page, self.path, 'Add Book')
Exemplo n.º 2
0
    def GET(self):
        d = {'type': web.ctx.site.get('/type/edition')}

        i = web.input()
        author = i.get('author') and web.ctx.site.get(i.author)
        if author:
            d['authors'] = [author]

        page = web.ctx.site.new("", d)
        return render.edit(page, self.path, 'Add Book')
Exemplo n.º 3
0
 def GET(self):
     from infogami.core.code import edit
     i = web.input("key")
     page = web.ctx.site.get(i.key)
     if page is None:
         raise web.seeother(i.key)
     else:
         d =page._getdata()
         for k in ['isbn_10', 'isbn_13', 'lccn', "oclc"]:
              d.pop(k, None)
         return render.edit(page, '/addbook', 'Clone Book')
Exemplo n.º 4
0
 def GET(self):
     from infogami.core.code import edit
     i = web.input('key')
     page = web.ctx.site.get(i.key)
     if page is None:
         raise web.seeother(i.key)
     else:
         d =page._getdata()
         for k in ['isbn_10', 'isbn_13', 'lccn', 'oclc']:
              d.pop(k, None)
         return render.edit(page, '/addbook', 'Clone Book')