Question · Cours Python · Module 5: Flask et applications web

render_template

Comment rend-on le template « species.html » avec une variable « animals » ?

Réponses possibles

  • return render('species.html').with(animals)
  • return template('species.html', animals)
  • return render_template('species.html', animals=animals)
  • return Jinja2('species.html', animals)

Tu vérifieras la bonne réponse en résolvant cet exercice dans le jeu CodeWorlds.