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

Add jinja2 widget templates #10

Merged
merged 4 commits into from
Aug 27, 2012
Merged

Conversation

clsdaniel
Copy link
Contributor

Added full jinja2 templates to widgets.

Genshi can transform a dict into an appropiate string of html attributes, mako emulates this with an extension (mako_util), jinja has a filter that does something similar xmlattr, however this filter does not handle special cases such as checked or selected attributes where the input dictionary has a value of True but the correct html attribute should read checked="checked".

To solve the mentioned issue and to get 100% tests passing this needs a patch to tw2.core which adds a small filter called htmlbools which checks this special cases and accomodates the correct values. This patch has been submited as a pull request to tw2.core (toscawidgets/tw2.core#48).

@ralphbean
Copy link
Contributor

Really nice.

ralphbean added a commit that referenced this pull request Aug 27, 2012
Add jinja2 widget templates
@ralphbean ralphbean merged commit 975e663 into toscawidgets:develop Aug 27, 2012
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

Successfully merging this pull request may close these issues.

None yet

2 participants