I am building a web app with google app engine with python as well as HTML and CSS and I have a bunch of pages (around 15) that I want to make that will all somewhat different though will have a similar purpose. Is there any way to only have a few handlers that can create a bunch of pages or do I need a different class in python for every page?
I know this question is somewhat vague without context for the pages but really any information about how to create multiple pages without coding entirely new handlers and HTML for them would be a huge help.
No you don’t need a different class for each page.
You can redirect every request to a singe script with
app.yamlThen, from
dispatcher.pyyou can redirect every request to a single RequestHandler and program all your logic there, like serving a differentjinja2template for different URLs dinamically.The URL Mappings documentation explains how to redirect multiples URLs to one RequestHandler. For example: