'Gets the value of the cookie with the given name, else default.'

def get_cookie(self, name, default=None):

    if ((self.request.cookies is not None) and (name in self.request.cookies)):
        return self.request.cookies[name].value
    return default
