Commented-out code still triggers errors

30 views
Skip to first unread message

joya.zh...@gmail.com

unread,
Sep 17, 2021, 11:18:19 AM9/17/21
to oTree help & discussion
Hi,

I tried to test my code in otree hub but it kept reporting mistakes in commented-out code. 
Is there any other fix for this besides deleting all the commented-out codes?

Best,
Junya

Chris @ oTree

unread,
Sep 17, 2021, 3:22:13 PM9/17/21
to oTree help & discussion
What errors? can you show an example?

joya.zh...@gmail.com

unread,
Sep 17, 2021, 3:32:58 PM9/17/21
to oTree help & discussion
Hi Chris,

Please see the error message as below. I have commented out the codes, but it still triggers errors. Thanks!

File Complex_Endo_set1/Receiver_choice.html, line 14, in static

11. <!--<div class = "left_column">-->

12. <!--Set <b>Gold</b> has the following three cards: <br><br>-->

13.

14. <!--<img src="{% static "Complex_message/Gold_Profile.jpg" %}" width="500px"/><br><br>-->

15.

16.

17. <!--Set <b>Silver</b> has the following three cards: <br><br>-->


Best,
Junya

Chris @ oTree

unread,
Sep 17, 2021, 3:35:49 PM9/17/21
to oTree help & discussion
OK I see. You can use comments like this instead:

{# this is a comment #}

That is more powerful than HTML comments.

joya.zh...@gmail.com

unread,
Sep 17, 2021, 3:38:56 PM9/17/21
to oTree help & discussion
Hi Chris,

I see. Thanks for the help!

Best,
Junya

Chris @ oTree

unread,
Sep 17, 2021, 3:42:16 PM9/17/21
to oTree help & discussion
comments can span multiple lines also:

{# line 1
line 2
.... #}

Reply all
Reply to author
Forward
0 new messages