Django nested if else in templates
<p>I'm using django embeded video so when user puts youtube link video I can have the thumbnail of the video using</p>

<pre><code>&lt;img src="{{ my_video.thumbnail }}" class="img-rounded" alt="☺" height="75" width="75"/&gt;
</code></pre>

<p>but when user inserts the link that that's not an youtube video I want to insert default image.</p>

<p>currently this is what I have</p>

<pre><code>{% if post.main_image %} //if post has main_image
&lt;img src="{{post.get_image_url}}"  class="img-rounded" alt="☺" height="75" width="75"/&gt;
  {% elif post.url %} //if post has url
    {% video post.video as my_video %} 
      {% if my_video %}//if that url is an link to video
        &lt;img src="{{ my_video.thumbnail }}" class="img-rounded" alt="☺" height="75" width="75"/&gt;
        {% elif %} //if that url isn't a video
        &lt;img src="{{post.image}}"  class="img-rounded" alt="☺ EBAGU" height="75" width="75"/&gt;
        {% endif %}
   {% endvideo %}
{% else %} //if it  doesn't have main_image or link
&lt;img src="{{post.thumbnail}}"  class="img-rounded" alt="☺" height="75" width="75"/&gt;
{% endif %}
</code></pre>

<p>with the above code I get</p>

<pre><code>TemplateSyntaxError at /post/aa-2/
Unexpected end of expression in if tag.
</code></pre>

<p>at {% if my_video%}</p>

<p>can someone please help me</p>

<p>This is a link to embed video app-> <a href="http://django-embed-video.readthedocs.org/en/v1.1.0/examples.html#template-examples" rel="noreferrer">http://django-embed-video.readthedocs.org/en/v1.1.0/examples.html#template-examples</a></p>