class MainPage(webapp.RequestHandler):

    def get(self):
        ip = self.request.remote_addr
log = Log()
log.ip_address = ip
log.put()
self.redirect('http://www.appurl.com')
Redirect user in Python + Google App Engine