I am using Flask(as framework) and MongoDB(as database server). Right now, all i can do is just pass one argument that i got from the database:
@app.route(\'
return render_template('im.html', user= None, content = xxx, timestamp = xxx)
You can pass as many variables as you need. The api
excerpt:
flask.render_template(template_name_or_list, **context) Renders a template from the template folder with the given context.
Parameters: template_name_or_list – the name of the template to be rendered, or an iterable with template names the first one existing will be rendered context – the variables that should be available in the context of the template.