daily pastebin goal
20%
SHARE
TWEET

mako namespace on include

a guest Nov 24th, 2015 7 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ## child/update.mako - this is the template we want to render
  2. <%namespace name="base" file="child/init.mako"/>
  3. <%include file="parent/update.mako"/>
  4.  
  5. ## child/init.mako
  6. <%namespace name="base" file="child/map.mako"/>
  7. <%namespace name="base" file="parent/map.mako"/>
  8.  
  9. ## child/map.mako
  10. <%
  11.   name = 'some name'
  12. %>
  13.  
  14. ## parent/map.mako
  15. <%
  16.   full_name = base.attr.name + 'with some more name' ## this goes through without any problem
  17. %>
  18.  
  19. ## parent/update.mako
  20. ${ base.attr.full_name } ## base is undefined here
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top