[Checkins] SVN: cmf.pt/trunk/ Extend the ignore_re list of CMFCore.DirectoryView to ignore our cache files named `.<original exten
Hanno Schlichting
hannosch at hannosch.eu
Fri Jul 24 07:12:41 EDT 2009
Log message for revision 102226:
Extend the ignore_re list of CMFCore.DirectoryView to ignore our cache files named `.<original exten
sion>.py`.
Changed:
U cmf.pt/trunk/CHANGES.txt
U cmf.pt/trunk/src/cmf/pt/fs.py
-=-
Modified: cmf.pt/trunk/CHANGES.txt
===================================================================
--- cmf.pt/trunk/CHANGES.txt 2009-07-24 10:06:48 UTC (rev 102225)
+++ cmf.pt/trunk/CHANGES.txt 2009-07-24 11:12:41 UTC (rev 102226)
@@ -4,6 +4,8 @@
0.5 - unreleased
----------------
+- Extend the ignore_re list of CMFCore.DirectoryView to ignore our cache
+ files named `.<original extension>.py`. [hannosch]
0.4 - 2009-05-18
----------------
Modified: cmf.pt/trunk/src/cmf/pt/fs.py
===================================================================
--- cmf.pt/trunk/src/cmf/pt/fs.py 2009-07-24 10:06:48 UTC (rev 102225)
+++ cmf.pt/trunk/src/cmf/pt/fs.py 2009-07-24 11:12:41 UTC (rev 102226)
@@ -1,3 +1,5 @@
+import re
+
# BBB for Zope 2.10
try:
from App.class_init import InitializeClass
@@ -20,6 +22,7 @@
from five.pt.pagetemplate import BaseTemplateFile
+
class FSPageTemplate(BaseTemplateFile, FSObject, Script):
meta_type = 'Filesystem Page Template'
@@ -96,3 +99,9 @@
DirectoryView.registerMetaType('Page Template', FSPageTemplate)
DirectoryView.registerMetaType('Controller Page Template', FSControllerPageTemplate)
+
+# Patch the ignore list, so that our .py source files don't show up in skins
+# folders
+old_ignore = DirectoryView.ignore_re
+new_ignore_re = re.compile(r'\.|(.*~$)|#|(.*\.(.?pt|htm.?)\.py$)')
+DirectoryView.ignore_re = new_ignore_re
More information about the Checkins
mailing list