Reputation: 1
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
Upvotes: 0
Views: 822
Reputation: 11
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())
Upvotes: 1
Reputation: 13525
Redirect is easy:
self.redirect("/home")
Example app also shows how users are redirected to the app after signing in.
Upvotes: 0
Reputation: 16253
Do you already understand how to create pages? If so, then linking between pages is just basic HTML:
<a href="/path/to/some/page">link text</a>
Upvotes: 2