Skip to content
New issue

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

Expression in tal:define fails #39

Closed
tsauerwein opened this issue Jul 22, 2014 · 3 comments
Closed

Expression in tal:define fails #39

tsauerwein opened this issue Jul 22, 2014 · 3 comments

Comments

@tsauerwein
Copy link

I have this Chameleon template, which is perfectly accepted by Chameleon:

<form
  tal:define="css_class css_class|string:${field.widget.css_class or field.css_class or ''};"
  >
...
</form>

When I try to run pot-create, I get the following error message:

Aborting due to Python syntax error in %s[%d]: %s ./.../templates/form.pt 1 (css_class|string:${field.widget.css_class or field.css_class or ''})

Is it the ${...} expression which causes the problem?

@wichert
Copy link
Owner

wichert commented Jul 23, 2014

The problem appears to be that lingua doesn't handle pipe-separated expressions here.

wichert added a commit that referenced this issue Jul 23, 2014
@tsauerwein
Copy link
Author

Thanks for the instant fix!

@wichert
Copy link
Owner

wichert commented Jul 23, 2014

You're welcome! I just released lingua 2.4 with this fix.

tsauerwein pushed a commit to tsauerwein/c2cgeoform that referenced this issue Jul 31, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants