<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>nwpct1</author_name>
  <author_url>https://blog.hatena.ne.jp/nwpct1/</author_url>
  <blog_title>c-bata web</blog_title>
  <blog_url>https://nwpct1.hatenablog.com/</blog_url>
  <categories>
    <anon>Python</anon>
    <anon>Webアプリ</anon>
    <anon>Flask</anon>
  </categories>
  <description>最近、FlaskでWebアプリを書いたりしていたので、ちょっとずつ勉強した内容をまとめてみる。 今回はFlaskで採用されているJinja2(テンプレートエンジン)についてのメモ。 条件分岐 {% if flag == 1 %} &lt;p&gt;あいうえお&lt;/p&gt; {% elif flag == 2 %} &lt;p&gt;かきくけこ&lt;/p&gt; {% else %} &lt;p&gt;さしすせそ&lt;/p&gt; {% endif %} リストでループ {% for comment in comments %} &lt;p&gt;{{loop.index}} : {{comment}}&lt;/p&gt; {% endfor %} 上の例のようにloop.ind…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fnwpct1.hatenablog.com%2Fentry%2Fflask-jinja2&quot; title=&quot;Jinja2メモ - c-bata web&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>http://ecx.images-amazon.com/images/I/51MiYDbJinL.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2014-08-09 14:38:01</published>
  <title>Jinja2メモ</title>
  <type>rich</type>
  <url>https://nwpct1.hatenablog.com/entry/flask-jinja2</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
