otree chat TemplateSyntaxError: Unparsable expression

351 views
Skip to first unread message

rajib prasad

unread,
Feb 7, 2022, 7:15:03 PM2/7/22
to oTree help & discussion
In every group, i have two subgroups and subgroup_id is defined in player class. For subgroup_id=1, I am trying to add a chat channel but I am getting an error: Application error (500) TemplateSyntaxError: Unparsable expression 'subgroup_id==1' (line 3, in "if").
I am not able to resolve this. What does this mean and how to resolve this issue?
My code for the html page is:

      {{ block content }}
     {{ if subgroup_id==1}}
           chat channel="Seller"
    {{ endif }}
{{ formfields }}
{{ next_button }}

{{ endblock }}

Chris @ oTree

unread,
Feb 7, 2022, 7:19:26 PM2/7/22
to rajib prasad, oTree help & discussion
Put spaces around the ==

Sent from my phone

On Feb 8, 2022, at 8:15 AM, rajib prasad <rwho...@gmail.com> wrote:


--
You received this message because you are subscribed to the Google Groups "oTree help & discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to otree+un...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/otree/a9dd90db-51d4-4082-931f-c36fb6c22857n%40googlegroups.com.

Chris @ oTree

unread,
Feb 7, 2022, 7:20:09 PM2/7/22
to rajib prasad, oTree help & discussion
{{ if subgroup_id == 1}}

Sent from my phone

> On Feb 8, 2022, at 8:15 AM, rajib prasad <rwho...@gmail.com> wrote:
>
> {{ if subgroup_id==1}}

rajib prasad

unread,
Feb 7, 2022, 7:22:41 PM2/7/22
to oTree help & discussion
thanks Chris. resolved.
Reply all
Reply to author
Forward
0 new messages