We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Demonstrated by (under Python 3):
from chameleon.zpt.template import PageTemplate def translate(*args, **kw): return "translated" class ToConvertButNotToTranslate: def __init__(self, text): self.text = text def __str__(self): return self.text x = ToConvertButNotToTranslate("x") ts = """<div tal:content="x" />""" t = PageTemplate(ts) t(translate=translate, x=x)
This returns <div>translated</div>; it should return <div>x</div>.
<div>translated</div>
<div>x</div>
The text was updated successfully, but these errors were encountered:
I see that the behavior is explicitly documented: "everything is translated which is not a string or a number and does not have __html__".
__html__
Thus, it is likely a feature (even though perhaps a strange one).
Sorry, something went wrong.
No branches or pull requests
Demonstrated by (under Python 3):
This returns
<div>translated</div>
; it should return<div>x</div>
.The text was updated successfully, but these errors were encountered: