[commits] r61 -
selinux-site/trunk/selinux.theme/selinux/theme/browser
tim at mail.se.linux.org
tim at mail.se.linux.org
Fre Juli 20 09:59:18 CEST 2007
Author: tim
Date: 2007-07-20 09:59:18 +0200 (Fri, 20 Jul 2007)
New Revision: 61
Added:
selinux-site/trunk/selinux.theme/selinux/theme/browser/caching.py
Log:
Forgot to commit this file.
Added: selinux-site/trunk/selinux.theme/selinux/theme/browser/caching.py
===================================================================
--- selinux-site/trunk/selinux.theme/selinux/theme/browser/caching.py 2007-07-20 07:55:32 UTC (rev 60)
+++ selinux-site/trunk/selinux.theme/selinux/theme/browser/caching.py 2007-07-20 07:59:18 UTC (rev 61)
@@ -0,0 +1,30 @@
+from Products.CMFCore.utils import getToolByName
+
+PATH1 = '/VirtualHostBase/http/'
+PATH2 = ':8000/selinux/VirtualHostRoot/'
+DOMAINS = ['se.linux.org',
+ 'selinux.se',
+ 'svenskalinuxforeningen.se',
+ 'svenskalinuxföreningen.se',]
+
+class InstallCaching(object):
+
+ def __init__(self, context, request):
+ self.context = context
+ self.request = request
+
+ def __call__(self):
+ portal_props = getToolByName(self, 'portal_properties')
+ site_props = getattr(portal_props, 'site_properties')
+
+ if not site_props.hasProperty('purging_enabled'):
+ site_props.manage_addProperty('purging_enabled', True, 'boolean')
+ if not site_props.hasProperty('purging_paths'):
+ paths = [PATH1 + domain + PATH2 for domain in DOMAINS]
+ site_props.manage_addProperty('purging_paths', paths, 'lines')
+ if not site_props.hasProperty('purging_host'):
+ site_props.manage_addProperty('purging_host', 'localhost', 'string')
+ if not site_props.hasProperty('purging_port'):
+ site_props.manage_addProperty('purging_port', '8000', 'string')
+
+ return 'Caching properties are added to site_properties'
More information about the commits
mailing list