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
base: master
Are you sure you want to change the base?
Conversation
a20ea2f
to
d3d7c3b
Compare
@@ -31,6 +35,26 @@ def show(self): | |||
show = api.user.is_anonymous() or self.show_authenticated | |||
return not is_configlet and show | |||
|
|||
@forever.memoize |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
@rodfersou tests are failing under Plone 5; you may want to change the code evaluated. |
@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): |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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'))
2ca58a2
to
6a7d719
Compare
d39778c
to
cdeb5a2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
closes #2