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

Adding TAL evaluation to template #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Adding TAL evaluation to template #4

wants to merge 1 commit into from

Conversation

rodfersou
Copy link
Member

closes #2

@rodfersou rodfersou force-pushed the issue_2 branch 2 times, most recently from a20ea2f to d3d7c3b Compare July 15, 2015 19:29
@@ -31,6 +35,26 @@ def show(self):
show = api.user.is_anonymous() or self.show_authenticated
return not is_configlet and show

@forever.memoize
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rodfersou are you completely sure this can be memoized forever?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, the TAL variables could change

@hvelarde
Copy link
Member

@rodfersou tests are failing under Plone 5; you may want to change the code evaluated.

@rodfersou
Copy link
Member Author

@hvelarde weird.. here tests passed locally for Plone 5

@@ -31,6 +34,25 @@ def show(self):
show = api.user.is_anonymous() or self.show_authenticated
return not is_configlet and show

def evaluate_code(self, code):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rodfersou can we better use here the Chameleon compiler?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't work
ExpressionError('invalid syntax', 'context/@@plone_portal_state/portal_url') (Also, the following error occurred while attempting to render the standard error message, please see the event log for full details: ('invalid syntax', u'context/@@plone_portal_state/portal_url'))

Copy link
Member

@hvelarde hvelarde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

an error on the expression leaves the site unusable.

screen shot 2017-05-08 at 18 24 25

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.

Insert information on viewlet based on context or view
2 participants