the template: <%inherit file="${layout}"/>
the problem: NameError?: global name 'layout' is not defined
when replacing the <%inherit %> with ${layout} the proper layout string is displayed
the solution (thanks to pjenvey): <%inherit file="${context.get('layout')}"/>