A tiny patch to ignore folders beginning with a period when compiling
templates for use on Google App Engine. This came up because I have
a .svn folder in my templates folder, and the compiler added an
"import .svn" line which obviously broke templates/__init__.py.
sil
--- web/template.py.orig 2009-01-04 20:04:25.000000000 +0000
+++ web/template.py 2009-01-04 20:04:29.000000000 +0000
@@ -1017,7 +1017,8 @@
out = open(os.path.join(dirpath, '__init__.py'), 'w')
out.write('from web.template import CompiledTemplate, ForLoop
\n\n')
- if dirnames:
+ allowed_dirnames = [x for x in dirnames if not x.startswith
(".")]
+ if allowed_dirnames:
out.write("import " + ", ".join(dirnames))
for f in filenames:
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---