Humm, I'd be -1 on this :(
Inline if/else in template are badly readable in my opinion, so I prefer to avoid them (and I think we do not want to duplicate the line). What's your opinion on this?
The goal is to have a javascript booleanable value, and I think given our toolbox the easiest is to use an integer.
Plus, given that we are in an HTML attribute, I think integers are fine; if we would put here "true" or "false", we would have strings on the js side (but maybe JQuery wizardries would cast them without asking).
Now, given that we very often use the (bad) pattern python => HTML => javascript, maybe you would prefer to have a `jsbool()` template filter?