検索

ホームページ  >  に質問  >  本文

python - flask问题

问题

home.html

{% extends "base/base.html" %}
{% block title %}Home{% endblock %}
{% block content %}
    {% include "./recent_post.html" %}
{% endblock %}

recent_post.html

{{ posts_list }}

现在xxx.py

return render_template('home.html',posts_list=get_posts_list)

怎么让recent_post.html里的posts_list获取到传过去的值呢

标签问题

巴扎黑巴扎黑2875日前586

全員に返信(2)返信します

  • ringa_lee

    ringa_lee2017-04-18 10:27:01

    リーリー

    返事
    0
  • 高洛峰

    高洛峰2017-04-18 10:27:01

    タグの問題は自動エスケープが原因です

    返事
    0
  • キャンセル返事