DEMO_PAGE_INTRO_HTML not shown on oTree hub
Steps to reproduce at time of writing:
- Goto https://www.otreehub.com/projects/mdt-intr-exp-met/
- Text includes the line "To edit your app's description, go to settings.py and edit DEMO_PAGE_INTRO_HTML."
- Click "Browse source code"
- Click "settings.py"
- Notice that
DEMO_PAGE_INTRO_HTMLis set:
...
DEMO_PAGE_INTRO_HTML = 'Risk attitude lottery game based on Holt and Laury (2002), followed by an interactive multi-player game about volunteering. <a href="https://github.com/peterjc/MDT-INTR-EXP-MET">Source code on GitHub</a>.'
The text is shown correctly on the demo page:
- Goto https://mdt-intr-exp-met.herokuapp.com/demo
- Notice following description in right hand side box "Risk attitude lottery game based on Holt and Laury (2002), followed by an interactive multi-player game about volunteering. Source code on GitHub." (with link)
Based on #107, were using DEMO_PAGE_INTRO_HTML with triple-quoted string broke, I suspect there is an ad hoc parser involved. This may not support all the Python string syntax?
All the working examples from a quick browse on oTree Hub use a triple-quoted multi-line string, like this:
DEMO_PAGE_INTRO_HTML = """
Experiment.
"""
Thank you for the report. Yes it's not 100% accurate but my goal is just to capture most of those strings.
So if I really want my example's description to show, just use a multi-line triple quoted string as a workaround?
Confirming successful workaround using a triple-quoted multi-line string, however surprisingly even with an introduction string the message about how to change it is still shown.