startling/cytoplasm — Issue #4: bombing with mako template inheritance
Author: pjv
Created: 2012-01-24 15:56:27+00:00
State: open

in trying to get started with cytoplasm i'm running into an issue early on. following the instructions in the tutorial, the initial set up and test posts worked fine. then i tried to move the templates from inside the blog controller to a _templates directory in the root of the site and create a simple "site.mako" template to be inherited by post.mako and chronological.mako.

i changed _config.py to point at the root _templates directory:

~~~~
...
controllers = [
# you can optionally specify where the templates are; here, use the controller's defaults.
("blog", ["_posts", "_build", "_templates"]),
]
~~~~

i put this line at the top of post and chronological:

~~~~
<%inherit file="/_templates/site.mako" />
~~~~

site.mako looks like this:

~~~~

cyto site sighting

${self.body()}

~~~~

then when i try to build or serve -r, it pukes ending with:

~~~~
File "/Volumes/hd/Users/paul/development/virtualenvs/cyto/lib/python2.7/site-packages/mako/runtime.py", line 704, in _exec_template
callable_(context, *args, **kwargs)
File "__templates_site_mako", line 22, in render_body
TypeError: render_body() takes at least 2 arguments (1 given)
~~~~

here is the entire traceback:
http://pastebin.com/5NyHWuYY