Beispiel #1
0
    def post(self, id, user_id):
        book, booklib = self._fetch(id, user_id)

        zsite = Zsite.mc_get(user_id)
        namecard = namecard_get(user_id)
        zsite_name = self.get_argument('zsite_name', '')
        name = self.get_argument('name', '')
        phone = self.get_argument('phone', '')
        days = self.get_argument('days', '1')

        if zsite_name:
            zsite.name = zsite_name
            zsite.save()
        if phone:
            namecard.phone = phone
        if name:
            namecard.name = name
        if days and days.isdigit():
            days = int(days)
            zsite_book_lib_browse(id, user_id, days, self.current_user_id)

        namecard.save()
        self.redirect("/book/lib/%s" % id)
    def post(self, id, user_id):
        book, booklib = self._fetch(id, user_id)
             
        zsite = Zsite.mc_get(user_id)
        namecard = namecard_get(user_id)
        zsite_name = self.get_argument('zsite_name','')
        name = self.get_argument('name','')
        phone = self.get_argument('phone','')
        days = self.get_argument('days','1')

        if zsite_name:
            zsite.name = zsite_name
            zsite.save()
        if phone:
            namecard.phone = phone
        if name:
            namecard.name = name
        if days and days.isdigit():
            days = int(days)
            zsite_book_lib_browse(id, user_id, days, self.current_user_id)

        namecard.save()
        self.redirect("/book/lib/%s"%id)
Beispiel #3
0
 def get(self, id, user_id):
     book, booklib = self._fetch(id, user_id)
     zsite = Zsite.mc_get(user_id)
     self.render(booklib=booklib, book=book, zsite=zsite)
 def get(self, id, user_id):
     book, booklib = self._fetch(id, user_id)
     zsite = Zsite.mc_get(user_id) 
     self.render(booklib=booklib, book=book, zsite=zsite)