Are you sure your redirect request handler is being called?
Put some logging.info("Here-1") calls in your code.Have you tried http://localhost:8080/learn Have you read and understand HTTP and HTML tutorials. Why not put the external link directly in the <a> tag <a href='http://www.some-site.com'>Learn</a> or in Django templates <a href='{{teach_URL}}'>Learn</a> And in your template render function add a template_values['teach_URL'] = 'http://www.some-site.com' 2011/2/20 Rutwick <[email protected]>: > Hi Robert, > > Thanks for the response! > I have practiced the guestbook app 2 times for learning, and now the > 3rd time, as I'm following it for making my own app. > > My data comes from some API, where in I'm passing a keyword. My > problem is, I want to use a set of template values commonly throughout > the site, no matter to what URL I'm going to. For example, if I want a > value 'site-header':'Hello!', I want it to be same on all the pages. I > have to pass it every time template.render function renders a page! I > want to do it so that I can have a templating sort of flow for the > site. Like, any where I call {{site-header}}, it should get the same > value. > > And one more doubt, how to redirect to a third party site from my app? > I made a tutorial for the app I'm making, and I want to redirect > people to it for learning it. I tried this: > My <div='nav'> has a like to my site: <a href='/learn'>Learn</a> > > My main.py file: > app = webapp.WSGIApplication([ ('/', Init), > ('/learn', Learn)] > > class Learn(webapp.RequestHandler): > def get(self): > self.redirect('myblog.com') > > This isn't working! When I click the link, I get > http://localhost:8080/myblog.com > in the address bar (I'm working locally) and I tried hard coding the > address, but it doesn't work either! > > Am I doing something wrong? > > Thanks, > Rutwick > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
