OVHcloud Community

Welcome to your community space. Ask questions, search for information, post content, and interact with other OVHcloud Community members.

Flask returns a dictionary or a table depending on python version


I am currently developing an app using Flask on an OVH server. I have two pages: a form and a result page.

Here is the app :

@application.route('/traitement', methods=['POST'])
def traitement():
    result = request.form
    return render_template("traitement.html", **result)

And here is the template :

{{ name }} {{ surname }}
On my local server, everything is working well. But on OVH, jinja2 works differently: I need to add [0] to name and surname to get the values as if the dictionary were converted into a table :

{{ name[0] }} {{ surname[0] }}
I have been looking at the version of the packages site I am using: there are identical. However, I am using python 3.7 locally whereas python 3.5 is used by OVH.

Do you think python versioning is the reason why jinja2 is asking for [0] ?
Does anyone know how to update python on OVH to 3.7 ? I am using Cloud Web servers.
If it is not possible to update python on OVH, how can I keep using dictionaries and not table on python 3.5 ?
Thank you in advance.