Search code examples
pythontemplatescheetah

cheetah parsing error trying to change cheetahVarStartToken


I am writing a cheetah template and I want to change the cheetahVarStartToken so that I can use the $ for javascript libraries in that section of code however when I run the template I am getting this error

ConfigParser.ParsingError: File contains parsing errors: [line 2]: u'\t\t\t cheetahVarStartToken = "%"\n'

here is my code

#compiler-settings
cheetahVarStartToken = "%"
#end compiler-settings

  <script>
   //My javascript code
  </script>

#compiler-settings reset

Solution

  • That assignment must start in the first column, so remove the whitespace at the front of cheetahVarStartToken:

    This works:

    cheetahVarStartToken = "%"
    

    This blows up:

     cheetahVarStartToken = "%"
    
     ConfigParser.ParsingError: File contains parsing errors: <???>
         [line  2]: ' cheetahVarStartToken = "%"\n'