template parse error

20 views
Skip to first unread message

sum abiut

unread,
Feb 22, 2018, 1:16:32 AM2/22/18
to django...@googlegroups.com
Could not parse the remainder: '=="1"' from 'selected_value=="1"'

i got the above error  when passing the select value. I have no clue what i am missing. please assist
{%if selected_value=="1"%}




Cheers,

Andy

unread,
Feb 22, 2018, 3:20:42 AM2/22/18
to Django users
Are you using the defautlt django template engine or something else?
Looks correct, but please show the full template, because there might be errors before that point causing this error message.

Daniel Roseman

unread,
Feb 22, 2018, 6:57:05 AM2/22/18
to Django users
You need spaces - the template language is not Python, and its parser is fairly basic.

    {% if selected_value == "1" %}

-- 
DR.

sum abiut

unread,
Feb 22, 2018, 5:14:54 PM2/22/18
to django...@googlegroups.com
Thanks heaps Daniel,
it was the spaces

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django...@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/e6befa94-3c19-4ff5-b65d-4aa912f160e0%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Reply all
Reply to author
Forward
0 new messages