Hi @jensens
Super nice to have posted so fast, but inserting this following code in a 'myview' template ... a LocationError occurs
<metal:block fill-slot="content-core">
XXX - this text comes below title and description
<!-- THIS WORKS IF NECESSARY
<p>
${python: 'Il y a {0} places en tout'.format(getattr(context.reservations, 'max_attendees', None))}
</p>
-->
<!-- THIS NOT : LocationError -->
<span tal:define="regview nocall:context/reservations/@@view;
available_seats regview/available_seats;">
<span tal:content="available_seats" /> /
</span>
<!-- THIS DOESN'T WORK NEITHER
<p>
${python: 'Il y a {0} places disponibles'.format(reservations.unrestrictedTraverse('@@view').available_seats())}
</p>
-->
</metal:block>
The TraceBack ...
Traceback (innermost last):
Module ZPublisher.Publish, line 138, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 48, in call_object
Module Shared.DC.Scripts.Bindings, line 322, in __call__
Module Shared.DC.Scripts.Bindings, line 359, in _bindAndExec
Module Products.PageTemplates.ZopePageTemplate, line 338, in _exec
Module Products.PageTemplates.ZopePageTemplate, line 435, in pt_render
Module Products.PageTemplates.PageTemplate, line 87, in pt_render
Module zope.pagetemplate.pagetemplate, line 137, in pt_render
Module five.pt.engine, line 98, in __call__
Module z3c.pt.pagetemplate, line 163, in render
Module chameleon.zpt.template, line 261, in render
Module chameleon.template, line 191, in render
Module chameleon.template, line 171, in render
Module bd8df01c3287ccba37c37bffa626bab8.py, line 230, in render
Module cdcb329ae3b23aa0055939a7689705a9.py, line 1167, in render_master
Module cdcb329ae3b23aa0055939a7689705a9.py, line 364, in render_content
Module bd8df01c3287ccba37c37bffa626bab8.py, line 167, in __fill_content_core
Module five.pt.expressions, line 135, in __call__
Module five.pt.expressions, line 126, in traverse
Module zope.traversing.adapters, line 142, in traversePathElement
- __traceback_info__: (<Products.Five.metaclass.MyFormWrapper object at 0x0000000018531B08>, 'available_seats')
Module zope.traversing.adapters, line 56, in traverse
- __traceback_info__: (<Products.Five.metaclass.MyFormWrapper object at 0x0000000018531B08>, 'available_seats', ())
LocationError: (<Products.Five.metaclass.MyFormWrapper object at 0x0000000018531B08>, 'available_seats')
- Expression: "regview/available_seats"
- Filename: /www/RERS-Alpha/portal_skins/custom/myview
- Location: (line 21: col 52)
- Arguments: repeat: {...} (0)
template: <ImplicitAcquisitionWrapper myview at 0x19dd4138L>
modules: <instance - at 0x5c42608L>
here: <ImplicitAcquisitionWrapper permanence-du-16-novembre-2020 at 0x19305b88L>
user: <ImplicitAcquisitionWrapper - at 0x19dd4458L>
nothing: <NoneType - at 0x768fea98L>
container: <ImplicitAcquisitionWrapper RERS-Alpha at 0x18ccea98L>
default: <object - at 0x57650a0L>
request: <instance - at 0x1a06db88L>
wrapped_repeat: <SafeMapping - at 0x19dd4ea8L>
traverse_subpath: <list - at 0x1a06eb08L>
loop: {...} (0)
context: <ImplicitAcquisitionWrapper permanence-du-16-novembre-2020 at 0x19305b88L>
translate: <function translate at 0x1a040748L>
root: <ImplicitAcquisitionWrapper Zope at 0x19139f98L>
options: {...} (1)
target_language: <NoneType - at 0x768fea98L>