Closed
Description
Migrated issue, originally created by Cody Taylor (@CodeMan99)
The documentation for Returning early from a template should suggest return an empty string. Otherwise python returns None
and that may appear in your rendered template.
We should also consider adding a constant to represent exiting a template for two reasons.
- Seeing return in the middle of a block of text can be very confusing since its normal syntax only holds meaning within a function or method.
- Would ensure that the suggestion of returning an empty string allows holds true. The first time I saw
None
in my rendered template I was really confused.
I would be more than willing to implement this change, but I would not know where to add the suggested constant.