I am creating a simple form in which when a user will select a particular
song and press Favorite button a star image will get pop up in front of
that song.
But it is showing TemplateSyntaxError.
Please correct me where I am wrong
here is my template
<img src="{{ album.album_logo.url }}">

<h1>{{ album.album_title}}</h1>
<h3>{{ album.artist }}</h3>

{% if error_message %}
<p><strong>{{ error_message }}</strong></p>
{% endif %}

<form action="{% url 'music:favorite' albums_id %}" method="post">
{% csrf_token %}
{% for song in album.song_set.all %}
<input type="radio" id="song{{ forloop.counter }}" name="song" value="{{
song.id}}">
<label for="song{{ forloop.counter }}">
{{ song.song_title }}
{{% if song.is_favorite %}}
<img src="http://i.imgur.com/b9b13Rd.png";>
{{% endif %}}
</label><br>
<input type="submit" value="Favorite" >
</form>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAMT%3DisUed7dkD%2BPCgis7bBZSAveti1Wy4WgNSoPA7Dm6kKLO3A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to