def get(self): u = self.user_info wUnits = wUnit1.query(wUnit1.ftype == "Template").order(wUnit1.unit_no) username = u['name'] if u else None params = {'username': username, 'wUnits': wUnits} rbac(self, 'adminU', params)
def pageCheck(self, username, unitNo): uChecks = wUnit1.query(wUnit1.author == username, wUnit1.unit_no == unitNo, wUnit1.ftype == 'Page', wUnit1.editS == "Started") uCheck = uChecks.fetch(1) if uCheck: status = True return status else: status = False return status
def get(self): u = self.user_info username = u['name'] unitNo = '1' wUnits = wUnit1.query(wUnit1.ftype == "Template").order(wUnit1.unit_no) params = { 'username': username, 'wUnits': wUnits, 'status': pageCheck(self, username, unitNo) } rbac(self, 'workbook', params)
def get(self, unitSeq): u = self.user_info username = u['name'] unitNo = unitSeq.split('A') PageCheck = wUnit1.query(wUnit1.author == username, wUnit1.unit_no == unitNo[0], wUnit1.ftype == 'Page').fetch(1) for check in PageCheck: pCheck = str(check.key.id()) if PageCheck: url='/sue/' + pCheck self.redirect(url) else: url='/suc/'+ unitNo[1] self.redirect(url)
def get(self, unitSeq): u = self.user_info username = u['name'] unitNo = unitSeq.split('A') PageCheck = wUnit1.query(wUnit1.author == username, wUnit1.unit_no == unitNo[0], wUnit1.ftype == 'Page').fetch(1) for check in PageCheck: pCheck = str(check.key.id()) if PageCheck: url = '/sue/' + pCheck self.redirect(url) else: url = '/suc/' + unitNo[1] self.redirect(url)