I am attempting to send a variable to the 'GetFiles' function in a model within web2py using this code snippet where the output is saved as 'a':
<script>
VARIABLE = 'teststring'
a = {{=XML(response.json(GetFiles(VARIABLE)))}}
</script>
Upon loading the page, VARIABLE is interpreted as a string literal instead of as 'teststring'.
An error message is displayed: NameError: name 'VARIABLE' is not defined
Substituting the value of VARIABLE manually resolves the issue without any errors.