Skip to content

Commit

Permalink
namespace works in lookup dir
Browse files Browse the repository at this point in the history
  • Loading branch information
TMaYaD committed Apr 30, 2009
1 parent 7816193 commit 4157a46
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion git-hooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ from mako.runtime import Context
template_dir = 'templates/'
public_dir = 'public/'

lookup = TemplateLookup(directories=[template_dir], module_directory='/tmp/mako_modules')
lookup = TemplateLookup(directories=[''], module_directory='/tmp/mako_modules')

def main():
templates = glob(template_dir + "*.mako")
Expand Down
2 changes: 0 additions & 2 deletions public/test.html
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@
example mako template
this is a disaster
4 changes: 4 additions & 0 deletions templates/test.mako
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
<%namespace file="lib/lib.mako" import="*"/>

example mako template
this is a disaster

${myfunc(7)}

0 comments on commit 4157a46

Please sign in to comment.