Closed chrislkeller closed 11 years ago
Glad you opened this one -- the problem here iirc is that Google spreadsheets mangles the header text. But I basically need to test it more and write a decent solution that formats headers for use as template variables in a sane way.
Whoops, meant to close this. This is fixed in the latest version of the Tarbell library (to upgrade run pip install -U -r requirements.txt
). The parser wasn't properly handling all the various permutations of Google spreadsheet's internal parsing. With these changes, underscores are always preserved in key names and column names, and key names and column names are always slugified and lowercased.
Wanted to check in on your workflow before making a pull request, cause I could just leave it a local change.
I know spaces in spreadsheet headers do not carry over to the template variables. I've found that underscores in spreadsheet headers don't carry over to the templates either.
An example is:
I'd be interested whether you just use single-word headers, and if so I'll adjust to that.
I guess the "feature" I'd pitch is adding...
...to the function that pulls the headers from the spreadsheet. Also, updating the docs to show that you can use spaces or underscores on the spreadsheet, but they will arrive at the template as single words variables.