I am a really beginner of google app engine and trying to figure out how to create a link to the other pages. Like after the user sign in, I want that there is link button that can redirect the users to some other pages I created .Thank you so much
3 Answers
To create a link to the other pages in Google app engine using python:
For example: hyperlink: <a href="/addproduct"> where /addproduct refer to the name of the class in .py file, Here is how the addproduct class is defined in .py file
class addproduct(webapp2.RequestHandler):
def get(self):
template = JINJA_ENVIRONMENT.get_template('adminaddproduct.html')
self.response.write(template.render())
Comments
Redirect is easy:
self.redirect("/home")
Example app also shows how users are redirected to the app after signing in.
1 Comment
Zeynel
For future reference and to improve the quality of my answers, maybe someone can explain what is so bad with this answer that it needed to be downvoted? The question asks about how redirect users after they sign in.