You were right....the error resolved when I removed curly braces from the
if statement. Thanks alot !!
On 01-Jun-2019 11:26 am, "sagar ninave" <[email protected]> wrote:

> you do not have ended for loop
>
> On Fri, May 31, 2019 at 7:41 PM anchal agarwal <[email protected]>
> wrote:
>
>> 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 [email protected].
>> To post to this group, send email to [email protected].
>> 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%2BPCgis7bBZSAveti1Wy4WgNSoPA7D
>> m6kKLO3A%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAMT%3DisUed7dkD%2BPCgis7bBZSAveti1Wy4WgNSoPA7Dm6kKLO3A%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> --
>
> <https://about.me/sagarninave?promo=email_sig&utm_source=product&utm_medium=email_sig&utm_campaign=gmail_api&utm_content=thumb>
> sagar ninave
> about.me/sagarninave
> <https://about.me/sagarninave?promo=email_sig&utm_source=product&utm_medium=email_sig&utm_campaign=gmail_api&utm_content=thumb>
>
> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> 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/CAA6pdZ-yw6hsS7aOj4czvEY5uCeb5NdYOuUiY
> 50SvGvhyPA5_g%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAA6pdZ-yw6hsS7aOj4czvEY5uCeb5NdYOuUiY50SvGvhyPA5_g%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
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%3DisXQdR2fvYbE-vGhOZVMrnqWvpXR5Rb%3D3XXF6a5Fi8RiqA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to