unrecognized filter format in oTree 5

128 views
Skip to first unread message

eka...@umich.edu

unread,
Feb 7, 2022, 4:03:09 PM2/7/22
to oTree help & discussion
I am trying to replicate Felix Holzmeister's MPL game from

The error I get when running it in oTree 5 is the following: 
Unrecognised filter name 'stringformat:"s"'


The full code for that portion is below.  


{% for i,f,p in choices %}
<tr>
<td class="pie-chart">
{% with j=i|stringformat:"s" %}
{% with pies_a="pie_a_"|add:j %}
<div id="{{ pies_a }}" class="pie-chart"></div>
{% endwith %}
{% endwith %}
</td>
<td class="pie-chart">
{% with j=i|stringformat:"s" %}
{% with pies_b="pie_b_"|add:j %}
<div id="{{ pies_b }}" class="pie-chart"></div>
{% endwith %}
{% endwith %}
</td>
</tr>
<tr>
<td class="center">
<button name="{{ f }}" value="A" class="btn btn-primary">
{% trans "Option A" %}
</button>
</td>
<td class="center">
<button name="{{ f }}" value="B" class="btn btn-primary">
{% trans "Option B" %}
</button>
</td>
</tr>
{% endfor %}

Chris @ oTree

unread,
Feb 7, 2022, 4:06:23 PM2/7/22
to eka...@umich.edu, oTree help & discussion
choice_list in otree-more-demos is my recommended starting point:

https://www.otreehub.com/projects/otree-more-demos/

Sent from my phone

On Feb 8, 2022, at 5:03 AM, eka...@umich.edu <eka...@umich.edu> 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/f0902650-bb2d-4c7a-bd76-964b48a69ba1n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages