How to display the Google App Engine template?

I know that you can display the template using something like:

    template_values = {
        'contacts': contacts,
        'url': url,
        'url_linktext': url_linktext,
    }

    path = os.path.join(os.path.dirname(__file__), 'index.html')        
    self.response.out.write(template.render(path, template_values))

My question is, how would I visualize the template ('addcontact.html) if it was just a simple form used to collect data?

Thank!

+3
source share
1 answer

template.render takes 2 arguments when there are no values ​​to pass, just use this {}

so it will be template.render (templatefile, {})

+3
source

Source: https://habr.com/ru/post/1785673/


All Articles