Have you tried %Defs.mymacro() ?
I would like to include a bunch of macro defs in a simple template but keep getting server error 500 if I try including the macro defs from a separate file. If I just paste the defs file into the beginning of the render template everything works fine. What am I doing wrong?
Here are simplified versions of the base, render and defs templates. (I have tried a bunch of variants of the include statement eg %include Defs mymacro=mymacro and get the same outcome)
Base.tpl:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>{{Title}}</title>
</head>
<body>
%include
</body>
</html>
Render.tpl
%rebase Base Title=Title
%include Defs
%mymacro()
<div>
Hello World
Defs.tpl
%def mymacro():
<h1> Hello World <h2>
%end
--
You are member of the "bottlepy" group at google groups.
See http://groups.google.de/group/bottlepy for mailing list options.
See http://bottlepy.org/ for news and documentation.
--
--
You are member of the "bottlepy" group at google groups.
See http://groups.google.de/group/bottlepy for mailing list options.
See http://bottlepy.org/ for news and documentation.
---
You received this message because you are subscribed to the Google Groups "bottlepy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bottlepy+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.