A few changes in handler.py template
weaversam8 opened this issue · 1 comments
weaversam8 commented
Hi there, this template is very helpful! Looking forward to building a custom handler!
I noticed a few discrepencies in my generated handler.py
, I believe there are some changes needed in handler.py.jinja
-
The comment on Line 1 still has
Python
hardcoded, I believe this should be{{ language|title }}
-
The class name generated will fail if the user enters spaces in the language name. I would have PRed a fix for both of these, but I wasn't sure what Jinja filter to use to transform a name like
"Language Name"
toLanguageName
pawamoy commented
Hey there! Looking forward to see what you do with it 😄!
- Good catch. You're right.
- Good catch as well. Getting rid of spaces should be easy enough:
{{ language.title().replace(" ", "") }}
(it's important to usetitle
first, otherwise we would lose any subsequent capital letter).
Would you like to open a PR fixing these two items?