I think you're looking at the documentation for a different version (0.13-dev) of Bottle from the one you're using (0.11.6).
The current "stable" version of Bottle is 0.11. It looks like the <% ... %>
feature of SimpleTemplate
was added some time between 0.12 and 0.13-dev, the current "dev" branch.
Here are the relevant 0.11 docs.
You can work around this in a few ways:
You could move to a newer, unreleased version of Bottle. Risky.
You could use the 0.11 mechanism for embedding Python code,
% .. %end
. But this is clearly deprecated, not to mention annoying for longer blocks of code.You could use a more robust templating language; Bottle integrates nicely with several. I chose Jinja2 and I recommend it. It's nearly as simple as Bottle's built-in templates but much more flexible. Here is someone else's similarly positive experience with Bottle + Jinja2.