Skip to content
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

can multiple templates be chained in python? #36

Open
7yl4r opened this issue Apr 15, 2014 · 1 comment
Open

can multiple templates be chained in python? #36

7yl4r opened this issue Apr 15, 2014 · 1 comment

Comments

@7yl4r
Copy link
Contributor

7yl4r commented Apr 15, 2014

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
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants