I am working in google app engine , i want to redirect browser to the specific URL which is retrived from Datastore.
The model of stored URL is like,
class WebReference(db.Model):
website = db.StringProperty()
webreferecnce=db.StringProperty()
My code is ,
query = db.GqlQuery("SELECT * FROM WebReference where webreferecnce = '10'")
results = query.fetch(1)
for r in results:
self.redirect(r.website)
I want to redirect the URL to the website who have webreference number 10. This is running at localhost but not after uploading. how can i achieve this ?