def get_request(self): """get the current request being verified""" def get_request(): return db.get_identity(long(self.id.data)) verify_request = get_cache(cache, Identity.get_key(self.id.data), get_request, 15 * 60) if not verify_request: verify_request = db.get_identity(self.id.data) return self.update_verify_request(verify_request)
def get(self, request): """ do verify form get processing, basically get the request to verify """ id = request.args.get('id') if id: #verify_request = db.get_identity_for_processing(id) verify_request = db.get_identity(id) else: verify_request = db.get_next_identity() # this line is for testing over and over with the same record you just have to put in the id you want #verify_request = db.get_identity(1417020710343152L) cache.set(Identity.get_key(verify_request.id), verify_request, 15 * 60) self.id.data = verify_request.id return verify_request
def get_request(): return db.get_identity(long(self.id.data))