rSimulate / Cosmosium

:earth_americas: js game engine for space-based games
Other
23 stars 7 forks source link

can multiple templates be chained in python? #36

Open 7yl4r opened 10 years ago

7yl4r commented 10 years ago

is return template('header',headerStuff=stuff) + template('footer',footerStuff=stuff2) a valid expression, and does it return a header+footer page like expected?

NOTE: another possible formulation of this idea is to use the bottle.include() function like:

@route('eg')
def routeExample():
  html = include('header',headerStuff=stuff)
  html += include('footer',footerStuff=stuff2)
  return html

Should we use this dynamic-build paradigm to build pages in the @route() definitions, or should we have page-level .tpl files like we do now (e.g. main_body.tpl, research.tpl, finances.tpl)?

BrianErikson commented 9 years ago

This issue may have been fixed with our new templating strategy in the latest merge.. Consider revisiting this to see if it's still needed.