[Zope-Checkins] SVN: Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/ZPT.py eeek...Zope 3 ZPTs now work in Zope 2 :-)

2005-12-09 Thread Andreas Jung
Log message for revision 40651:
  eeek...Zope 3 ZPTs now work in Zope 2 :-)
  

Changed:
  U   Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/ZPT.py

-=-
Modified: Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/ZPT.py
===
--- Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/ZPT.py  
2005-12-09 10:07:57 UTC (rev 40650)
+++ Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/ZPT.py  
2005-12-09 14:25:51 UTC (rev 40651)
@@ -17,69 +17,365 @@
 
 __version__='$Revision: 1.48 $'[11:-2]
 
+import os, AccessControl, Acquisition, sys, types
 from types import StringType
-from Globals import DTMLFile, ImageFile, MessageDialog, package_home, 
Persistent
+from Globals import DTMLFile, ImageFile, MessageDialog, package_home
 from zLOG import LOG, ERROR, INFO
 from OFS.SimpleItem import SimpleItem
-import AccessControl
+from DateTime.DateTime import DateTime
+from Shared.DC.Scripts.Script import Script, BindingsUI
+from Shared.DC.Scripts.Signature import FuncCode
 from AccessControl import getSecurityManager
-
-from zope.pagetemplate.pagetemplate import PageTemplate 
+try:
+from AccessControl import Unauthorized
+except ImportError:
+Unauthorized = Unauthorized
+from OFS.History import Historical, html_diff
+from OFS.Cache import Cacheable
+from OFS.Traversable import Traversable
+from OFS.PropertyManager import PropertyManager
+#from PageTemplate import PageTemplate
+from Products.PageTemplates.Expressions import SecureModuleImporter
 from Products.PageTemplates.PageTemplateFile import PageTemplateFile
 
-class ZPT(SimpleItem, PageTemplate):
+try:
+from webdav.Lockable import ResourceLockedError
+from webdav.WriteLockInterface import WriteLockInterface
+SUPPORTS_WEBDAV_LOCKS = 1
+except ImportError:
+SUPPORTS_WEBDAV_LOCKS = 0
+
+
+from zope.pagetemplate.pagetemplate import PageTemplate
+
+class Src(Acquisition.Explicit):
+ 
+
+PUT = document_src = Acquisition.Acquired
+index_html = None
+
+def __before_publishing_traverse__(self, ob, request):
+if getattr(request, '_hacked_path', 0):
+request._hacked_path = 0
+
+def __call__(self, REQUEST, RESPONSE):
+ 
+return self.document_src(REQUEST)
+
+
+class ZPT(Script, PageTemplate, Historical, Cacheable,
+   Traversable, PropertyManager):
 Zope wrapper for Page Template using TAL, TALES, and METAL
 
+if SUPPORTS_WEBDAV_LOCKS:
+__implements__ = (WriteLockInterface,)
+
 meta_type = 'ZPT'
 
+func_defaults = None
+func_code = FuncCode((), 0)
+
+_default_bindings = {'name_subpath': 'traverse_subpath'}
+_default_content_fn = os.path.join(package_home(globals()),
+   'www', 'default.html')
+
 manage_options = (
 {'label':'Edit', 'action':'pt_editForm',
  'help': ('PageTemplates', 'PageTemplate_Edit.stx')},
 {'label':'Test', 'action':'ZScriptHTML_tryForm'},
-) \
+) + PropertyManager.manage_options \
++ Historical.manage_options \
 + SimpleItem.manage_options \
-
-security = AccessControl.ClassSecurityInfo()
++ Cacheable.manage_options
 
+_properties=({'id':'title', 'type': 'string', 'mode': 'wd'},
+ {'id':'content_type', 'type':'string', 'mode': 'w'},
+ {'id':'expand', 'type':'boolean', 'mode': 'w'},
+ )
+
 def __init__(self, id, text=None, content_type=None):
 self.id = str(id)
+self.ZBindings_edit(self._default_bindings)
+if text is None:
+text = open(self._default_content_fn).read()
+self.pt_edit(text, content_type)
 
+def _setPropValue(self, id, value):
+PropertyManager._setPropValue(self, id, value)
+self.ZCacheable_invalidate()
+
+security = AccessControl.ClassSecurityInfo()
+
+security.declareObjectProtected('View')
 security.declareProtected('View', '__call__')
-security.declareProtected('View', 'view')
-def view(self):
-view 
-return self()
 
+security.declareProtected('View management screens',
+  'pt_editForm', 'manage_main', 'read',
+  'ZScriptHTML_tryForm', 'PrincipiaSearchSource',
+  'document_src', 'source_dot_xml')
+
+security.declareProtected('FTP access',
+  'manage_FTPstat','manage_FTPget','manage_FTPlist')
+
+pt_editForm = PageTemplateFile('www/ptEdit', globals(),
+   __name__='pt_editForm')
+pt_editForm._owner = None
+manage = manage_main = pt_editForm
+
+source_dot_xml = Src()
+
 security.declareProtected('Change Page Templates',
   'pt_editAction', 'pt_setTitle', 'pt_edit',
   'pt_upload', 'pt_changePrefs')
 def pt_editAction(self, REQUEST, title, text, content_type, expand):
 Change the title and document.
-
-print text
-print content_type
+

Re: [Zope-Checkins] SVN: Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/ZPT.py eeek...Zope 3 ZPTs now work in Zope 2 :-)

2005-12-09 Thread Stephan Richter
On Friday 09 December 2005 09:25, Andreas Jung wrote:
 Log message for revision 40651:
   eeek...Zope 3 ZPTs now work in Zope 2 :-)

Wow, that was fast! Very cool!

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/ajung-zpt-integration/lib/python/AccessControl/Permissions.py change_page_templates

2005-12-09 Thread Andreas Jung
Log message for revision 40652:
  change_page_templates
  

Changed:
  U   
Zope/branches/ajung-zpt-integration/lib/python/AccessControl/Permissions.py

-=-
Modified: 
Zope/branches/ajung-zpt-integration/lib/python/AccessControl/Permissions.py
===
--- Zope/branches/ajung-zpt-integration/lib/python/AccessControl/Permissions.py 
2005-12-09 14:25:51 UTC (rev 40651)
+++ Zope/branches/ajung-zpt-integration/lib/python/AccessControl/Permissions.py 
2005-12-09 14:59:33 UTC (rev 40652)
@@ -40,6 +40,7 @@
 change_configuration='Change configuration'
 change_permissions='Change permissions'
 change_proxy_roles='Change proxy roles'
+change_page_templates='Change Page Templates'
 create_class_instances='Create class instances'
 define_permissions='Define permissions'
 delete_objects='Delete objects'

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/www/ptEdit.zpt

2005-12-09 Thread Andreas Jung
Log message for revision 40658:
  

Changed:
  U   Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/www/ptEdit.zpt

-=-
Modified: 
Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/www/ptEdit.zpt
===
--- Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/www/ptEdit.zpt  
2005-12-09 15:18:10 UTC (rev 40657)
+++ Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/www/ptEdit.zpt  
2005-12-09 15:26:21 UTC (rev 40658)
@@ -1,9 +1,9 @@
-h1 tal:replace=structure here/manage_page_headerHeader/h1
+h1 tal:replace=structure context/manage_page_headerHeader/h1
 h2 tal:define=manage_tabs_message options/manage_tabs_message | nothing
-tal:replace=structure here/manage_tabsTabs/h2
+tal:replace=structure context/manage_tabsTabs/h2
 
 tal:block define=global body request/other/text | request/form/text
-| here/read / 
+| context/read / 
 form action= method=post tal:attributes=action request/URL1
 input type=hidden name=:default_method value=pt_changePrefs
 table width=100% cellspacing=0 cellpadding=2 border=0
@@ -15,7 +15,7 @@
 /td
 td align=left valign=middle
 input type=text name=title size=40 
-   tal:attributes=value request/title | here/title /
+   tal:attributes=value request/title | context/title /
 /td
 td align=left valign=middle
 div class=form-optional
@@ -24,7 +24,7 @@
 /td
 td align=left valign=middle
 input type=text name=content_type size=14 
-   tal:attributes=value request/content_type | here/content_type /
+   tal:attributes=value request/content_type | context/content_type 
/
 /td
   /tr
   tr
@@ -35,35 +35,33 @@
 /td
 td align=left valign=middle
 div class=form-text 
- tal:content=python:here.bobobase_modification_time().strftime('%Y-%m-%d 
%I:%M %p')1/1/2000
+ 
tal:content=python:context.bobobase_modification_time().strftime('%Y-%m-%d 
%I:%M %p')1/1/2000
 /div
 /td
 td align=left valign=top colspan=2
 !--
-  a href=source.html tal:condition=here/htmlBrowse HTML source/a
-  a href=source.xml tal:condition=not:here/htmlBrowse XML source/a
+  a href=source.html tal:condition=context/htmlBrowse HTML source/a
+  a href=source.xml tal:condition=not:context/htmlBrowse XML 
source/a
 --
   br
   input type=hidden name=expand:int:default value=0
   input type=checkbox value=1 name=expand:int
-   tal:attributes=checked request/expand | here/expand
+   tal:attributes=checked request/expand | context/expand
   Expand macros when editing
 /td
   /tr
 
-  span tal:content=python: context.pt_errors(None) /
-!--
-  tr tal:define=errors here/pt_errors tal:condition=errors
-tal:block define=global body python:here.document_src({'raw':1})/
+  !-- XXX: check if 'None' is a proper argument for 'namespace' --
+  tr tal:define=errors python: context.pt_errors(None) 
tal:condition=errors
+tal:block define=global body python:context.document_src({'raw':1})/
 td align=left valign=middle class=form-labelErrors/td
 td align=left valign=middle style=background-color: #FF
 colspan=3
 pre tal:content=python:modules['string'].join(errors, '\n')errors/pre
 /td
   /tr
---
 
-  tr tal:define=warnings here/pt_warnings tal:condition=warnings
+  tr tal:define=warnings context/pt_warnings tal:condition=warnings
 td align=left valign=middle class=form-labelWarnings/td
 td align=left valign=middle style=background-color: #FFEEDD
  colspan=3
@@ -90,8 +88,8 @@
 tr
   td align=left valign=top colspan=4
   div class=form-element
-em tal:condition=here/wl_isLockedLocked by WebDAV/em
-input tal:condition=not:here/wl_isLocked
+em tal:condition=context/wl_isLockedLocked by WebDAV/em
+input tal:condition=not:context/wl_isLocked
  class=form-element type=submit 
  name=pt_editAction:method value=Save Changes
   nbsp;nbsp;
@@ -106,10 +104,10 @@
 /form
 
 p class=form-help
-You can upload the text for span tal:replace=here/title_and_id /
+You can upload the text for span tal:replace=context/title_and_id /
 using the following form.
 Choose an existing HTML or XML file from your local computer by clicking
-embrowse/em.  You can also a href=document_srcclick here/a
+embrowse/em.  You can also a href=document_srcclick context/a
 to view or download the current text.
 /p
 
@@ -134,15 +132,15 @@
   /td
   td align=left valign=top
 input name=charset value=
-  tal:attributes=value here/management_page_charset|default /
+  tal:attributes=value context/management_page_charset|default /
   /td
 /tr
 tr
   td/td
   td align=left valign=top
   div class=form-element
-em tal:condition=here/wl_isLockedLocked by WebDAV/em
-input tal:condition=not:here/wl_isLocked
+em tal:condition=context/wl_isLockedLocked by WebDAV/em
+input tal:condition=not:context/wl_isLocked
 class=form-element type=submit value=Upload File
   /div
 

[Zope-Checkins] SVN: Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/ cleanup

2005-12-09 Thread Andreas Jung
Log message for revision 40660:
  cleanup
  

Changed:
  A   Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/pt/
  D   Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/pt/ptAdd.zpt
  A   Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/pt/ptAdd.zpt
  D   Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/pt/ptEdit.zpt
  A   Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/pt/ptEdit.zpt
  D   Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/www/

-=-
Copied: Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/pt (from 
rev 40644, Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/www)

Deleted: 
Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/pt/ptAdd.zpt
===
--- Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/www/ptAdd.zpt   
2005-12-08 20:07:43 UTC (rev 40644)
+++ Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/pt/ptAdd.zpt
2005-12-09 15:30:22 UTC (rev 40660)
@@ -1,51 +0,0 @@
-h1 tal:replace=structure here/manage_page_headerHeader/h1
-
-h2 tal:define=form_title string:Add Page Template
-tal:replace=structure here/manage_form_titleForm Title/h2
-
-p class=form-help
-Page Templates allow you to use simple HTML or XML attributes to
-create dynamic templates.  You may choose to upload the template text
-from a local file by typing the file name or using the embrowse/em
-button.
-/p
-
-form action=manage_addPageTemplate method=post 
- enctype=multipart/form-data
-table cellspacing=0 cellpadding=2 border=0
-  tr
-td align=left valign=top
-div class=form-label
-Id
-/div
-/td
-td align=left valign=top
-input type=text name=id size=40 /
-/td
-  /tr
-  tr
-td align=left valign=top
-div class=form-optional
-File
-/div
-/td
-td align=left valign=top
-input type=file name=file size=25 value= /
-/td
-  /tr
-  tr
-td align=left valign=top
-/td
-td align=left valign=top
-div class=form-element
-input class=form-element type=submit name=submit 
- value= Add  / 
-input class=form-element type=submit name=submit 
- value= Add and Edit  /
-/div
-/td
-  /tr
-/table
-/form
-
-h1 tal:replace=structure here/manage_page_footerFooter/h1

Copied: 
Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/pt/ptAdd.zpt (from 
rev 40645, 
Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/www/ptAdd.zpt)

Deleted: 
Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/pt/ptEdit.zpt
===
--- Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/www/ptEdit.zpt  
2005-12-08 20:07:43 UTC (rev 40644)
+++ Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/pt/ptEdit.zpt   
2005-12-09 15:30:22 UTC (rev 40660)
@@ -1,148 +0,0 @@
-h1 tal:replace=structure here/manage_page_headerHeader/h1
-h2 tal:define=manage_tabs_message options/manage_tabs_message | nothing
-tal:replace=structure here/manage_tabsTabs/h2
-
-tal:block define=global body request/other/text | request/form/text
-| here/read / 
-form action= method=post tal:attributes=action request/URL1
-input type=hidden name=:default_method value=pt_changePrefs
-table width=100% cellspacing=0 cellpadding=2 border=0
-  tr
-td align=left valign=middle
-div class=form-optional
-Title
-/div
-/td
-td align=left valign=middle
-input type=text name=title size=40 
-   tal:attributes=value request/title | here/title /
-/td
-td align=left valign=middle
-div class=form-optional
-Content-Type
-/div
-/td
-td align=left valign=middle
-input type=text name=content_type size=14 
-   tal:attributes=value request/content_type | here/content_type /
-/td
-  /tr
-  tr
-td align=left valign=middle
-div class=form-label
-Last Modified
-/div
-/td
-td align=left valign=middle
-div class=form-text 
- tal:content=python:here.bobobase_modification_time().strftime('%Y-%m-%d 
%I:%M %p')1/1/2000
-/div
-/td
-td align=left valign=top colspan=2
-  a href=source.html tal:condition=here/htmlBrowse HTML source/a
-  a href=source.xml tal:condition=not:here/htmlBrowse XML source/a
-  br
-  input type=hidden name=expand:int:default value=0
-  input type=checkbox value=1 name=expand:int
-   tal:attributes=checked request/expand | here/expand
-  Expand macros when editing
-/td
-  /tr
-
-  tr tal:define=errors here/pt_errors tal:condition=errors
-tal:block define=global body python:here.document_src({'raw':1})/
-td align=left valign=middle class=form-labelErrors/td
-td align=left valign=middle style=background-color: #FF
-colspan=3
-pre tal:content=python:modules['string'].join(errors, '\n')errors/pre
-/td
-  /tr
-
-  tr tal:define=warnings here/pt_warnings 

[Zope-Checkins] SVN: Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/ - smarter upload

2005-12-09 Thread Andreas Jung
Log message for revision 40666:
  - smarter upload
  - enforcing UTF-8 in the ZMI
  - enforcing unicode as internal  representation
  - added some assertions to check for unicode
  

Changed:
  U   Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/ZPT.py
  U   Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/pt/ptEdit.zpt

-=-
Modified: Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/ZPT.py
===
--- Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/ZPT.py  
2005-12-09 16:56:40 UTC (rev 40665)
+++ Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/ZPT.py  
2005-12-09 17:06:16 UTC (rev 40666)
@@ -20,6 +20,7 @@
 import os, AccessControl, Acquisition 
 from Globals import ImageFile, package_home, InitializeClass
 from OFS.SimpleItem import SimpleItem
+from OFS.content_types import guess_content_type
 from DateTime.DateTime import DateTime
 from Shared.DC.Scripts.Script import Script 
 from Shared.DC.Scripts.Signature import FuncCode
@@ -63,6 +64,7 @@
 __implements__ = (WriteLockInterface,)
 
 meta_type = 'ZPT'
+management_page_charset = 'utf-8'
 
 func_defaults = None
 func_code = FuncCode((), 0)
@@ -90,12 +92,12 @@
 security.declareObjectProtected(view)
 security.declareProtected(view, '__call__')
 
-def __init__(self, id, text=None, content_type=None):
+def __init__(self, id, text=None, content_type=None, encoding='utf-8'):
 self.id = str(id)
 self.ZBindings_edit(self._default_bindings)
 if text is None:
 text = open(self._default_content_fn).read()
-self.pt_edit(text, content_type)
+self.pt_edit(text, content_type, encoding)
 
 def _setPropValue(self, id, value):
 PropertyManager._setPropValue(self, id, value)
@@ -104,7 +106,11 @@
 
 
 security.declareProtected(change_page_templates, 'pt_edit')
-def pt_edit(self, text, content_type):
+def pt_edit(self, text, content_type, encoding='utf-8'):
+if not isinstance(text, unicode):
+text = unicode(text, encoding, 'strict')
+assert isinstance(text, unicode)
+self.ZCacheable_invalidate()
 PageTemplate.pt_edit(self, text, content_type)
 
 security.declareProtected(change_page_templates, 'pt_editAction')
@@ -143,16 +149,22 @@
 if self.wl_isLocked():
 raise ResourceLockedError(File is locked via WebDAV)
 
+filename = None
 if not isinstance(file, str):
 if not file: raise ValueError('File not specified')
+filename = file.filename
 file = file.read()
-if charset:
-try:
-unicode(file, 'us-ascii')
-file = str(file)
-except UnicodeDecodeError:
-file = unicode(file, charset)
-self.write(file)
+
+ct, dummy = guess_content_type(filename, file)   
+if not ct in ('text/html', 'text/xml'):
+raise ValueError('Unsupported mimetype: %s' % ct)
+
+if not isinstance(file, unicode):
+if not charset:
+raise ValueError('No encoding specified for non-unicode 
content')
+file = unicode(file, charset)
+
+self.pt_edit(file, ct)
 message = 'Saved changes.'
 return self.pt_editForm(manage_tabs_message=message)
 
@@ -205,10 +217,9 @@
  }
 return c
 
-security.declareProtected(change_page_templates, 'write')
-def write(self, text):
-self.ZCacheable_invalidate()
-PageTemplate.write(self, text)
+#security.declareProtected(change_page_templates, 'write')
+#def write(self, text):
+#PageTemplate.write(self, text)
 
 security.declareProtected(view_management_screens, 'manage_main', 'read',
   'ZScriptHTML_tryForm')
@@ -248,6 +259,7 @@
 try:
 # XXX: check the parameters for pt_render()! (aj)
 result = self.pt_render(self.pt_getContext())
+assert isinstance(result, unicode)
 
 #result = self.pt_render(extra_context=bound_names)
 if keyset is not None:
@@ -266,7 +278,8 @@
  Handle HTTP PUT requests 
 self.dav__init(REQUEST, RESPONSE)
 self.dav__simpleifhandler(REQUEST, RESPONSE, refresh=1)
-self.write(REQUEST.get('BODY', ''))
+## XXX:this should be unicode or we must pass an encoding
+self.pt_edit(REQUEST.get('BODY', ''))
 RESPONSE.setStatus(204)
 return RESPONSE
 
@@ -281,7 +294,7 @@
 self.REQUEST.RESPONSE.setHeader('Content-Type', self.content_type)
 return self.read()
 
-security.declareProtected(view_manage_screens, 'html')
+security.declareProtected(view_management_screens, 'html')
 def html(self):
 return self.content_type == 'text/html'
 

Modified: 
Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/pt/ptEdit.zpt

[Zope-Checkins] SVN: Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/pt/pt savepoint

2005-12-09 Thread Andreas Jung
Log message for revision 40670:
  savepoint
  

Changed:
  A   Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/pt/ptAdd.pt
  D   Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/pt/ptAdd.zpt
  A   Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/pt/ptEdit.pt
  D   Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/pt/ptEdit.zpt

-=-
Copied: Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/pt/ptAdd.pt 
(from rev 40660, 
Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/pt/ptAdd.zpt)

Deleted: 
Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/pt/ptAdd.zpt
===
--- Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/pt/ptAdd.zpt
2005-12-09 17:16:02 UTC (rev 40669)
+++ Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/pt/ptAdd.zpt
2005-12-09 17:31:16 UTC (rev 40670)
@@ -1,51 +0,0 @@
-h1 tal:replace=structure here/manage_page_headerHeader/h1
-
-h2 tal:define=form_title string:Add Page Template
-tal:replace=structure here/manage_form_titleForm Title/h2
-
-p class=form-help
-Page Templates allow you to use simple HTML or XML attributes to
-create dynamic templates.  You may choose to upload the template text
-from a local file by typing the file name or using the embrowse/em
-button.
-/p
-
-form action=manage_addZPT method=post 
- enctype=multipart/form-data
-table cellspacing=0 cellpadding=2 border=0
-  tr
-td align=left valign=top
-div class=form-label
-Id
-/div
-/td
-td align=left valign=top
-input type=text name=id size=40 /
-/td
-  /tr
-  tr
-td align=left valign=top
-div class=form-optional
-File
-/div
-/td
-td align=left valign=top
-input type=file name=file size=25 value= /
-/td
-  /tr
-  tr
-td align=left valign=top
-/td
-td align=left valign=top
-div class=form-element
-input class=form-element type=submit name=submit 
- value= Add  / 
-input class=form-element type=submit name=submit 
- value= Add and Edit  /
-/div
-/td
-  /tr
-/table
-/form
-
-h1 tal:replace=structure here/manage_page_footerFooter/h1

Copied: 
Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/pt/ptEdit.pt (from 
rev 40666, 
Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/pt/ptEdit.zpt)

Deleted: 
Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/pt/ptEdit.zpt
===
--- Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/pt/ptEdit.zpt   
2005-12-09 17:16:02 UTC (rev 40669)
+++ Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/pt/ptEdit.zpt   
2005-12-09 17:31:16 UTC (rev 40670)
@@ -1,149 +0,0 @@
-h1 tal:replace=structure context/manage_page_headerHeader/h1
-h2 tal:define=manage_tabs_message options/manage_tabs_message | nothing
-tal:replace=structure context/manage_tabsTabs/h2
-
-tal:block define=global body request/other/text | request/form/text
-| context/read / 
-form action= method=post tal:attributes=action request/URL1
-input type=hidden name=:default_method value=pt_changePrefs
-table width=100% cellspacing=0 cellpadding=2 border=0
-  tr
-td align=left valign=middle
-div class=form-optional
-Title
-/div
-/td
-td align=left valign=middle
-input type=text name=title size=40 
-   tal:attributes=value request/title | context/title /
-/td
-td align=left valign=middle
-div class=form-optional
-Content-Type
-/div
-/td
-td align=left valign=middle
-input type=text name=content_type size=14 
-   tal:attributes=value request/content_type | context/content_type 
/
-/td
-  /tr
-  tr
-td align=left valign=middle
-div class=form-label
-Last Modified
-/div
-/td
-td align=left valign=middle
-div class=form-text 
- 
tal:content=python:context.bobobase_modification_time().strftime('%Y-%m-%d 
%I:%M %p')1/1/2000
-/div
-/td
-td align=left valign=top colspan=2
-  a href=source.html tal:condition=context/htmlBrowse HTML source/a
-  a href=source.xml tal:condition=not:context/htmlBrowse XML 
source/a
-
-  br
-  input type=hidden name=expand:int:default value=0
-  input type=checkbox value=1 name=expand:int
-   tal:attributes=checked request/expand | context/expand
-  Expand macros when editing
-/td
-  /tr
-
-  !-- XXX: check if 'None' is a proper argument for 'namespace' --
-  tr tal:define=errors python: context.pt_errors(None) 
tal:condition=errors
-tal:block define=global body python:context.document_src({'raw':1})/
-td align=left valign=middle class=form-labelErrors/td
-td align=left valign=middle style=background-color: #FF
-colspan=3
-pre tal:content=python:modules['string'].join(errors, '\n')errors/pre
-/td
-  /tr
-
-  tr tal:define=warnings context/pt_warnings tal:condition=warnings
-   

[Zope-Checkins] SVN: Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/ZPT.py - savepoint

2005-12-09 Thread Andreas Jung
Log message for revision 40671:
  - savepoint
  - title attribute is now a ustring propery
  - some not working preparations to get rid of original ZPT dependencies
  

Changed:
  U   Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/ZPT.py

-=-
Modified: Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/ZPT.py
===
--- Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/ZPT.py  
2005-12-09 17:31:16 UTC (rev 40670)
+++ Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/ZPT.py  
2005-12-09 17:32:31 UTC (rev 40671)
@@ -40,7 +40,8 @@
 from webdav.Lockable import ResourceLockedError
 from webdav.WriteLockInterface import WriteLockInterface
 
-from zope.pagetemplate.pagetemplate import PageTemplate
+from zope.pagetemplate.pagetemplate import PageTemplate 
+#from zope.pagetemplate.pagetemplatefile import PageTemplateFile
 
 class Src(Acquisition.Explicit):
  I am scary code 
@@ -57,6 +58,8 @@
 return self.document_src(REQUEST)
 
 
+
+
 class ZPT(Script, PageTemplate, Historical, Cacheable,
Traversable, PropertyManager):
  Z2 wrapper class for Zope 3 page templates 
@@ -131,16 +134,10 @@
 
 
 security.declareProtected(change_page_templates, 'pt_setTitle')
-def pt_setTitle(self, title):
-charset = getattr(self, 'management_page_charset', None)
-if isinstance(title, str) and charset:
-try:
-title.decode('us-ascii')
-title = str(title)
-except UnicodeError:
-title = unicode(title, charset)
-elif not isinstance(title, unicode):
-title = str(title)
+def pt_setTitle(self, title, encoding='utf-8'):
+
+if not isinstance(title, unicode):
+title = unicode(title, encoding)
 self._setPropValue('title', title)
 
 security.declareProtected(change_page_templates, 'pt_upload')
@@ -349,9 +346,8 @@
 source_dot_xml = Src()
 
 security.declareProtected(view_management_screens, 'pt_editForm')
-pt_editForm = PageTemplateFile('pt/ptEdit', globals(),
-   __name__='pt_editForm')
-pt_editForm._owner = None
+pt_editForm = PageTemplateFile('pt/ptEdit.pt', globals())
+pt_editForm.__name__ = 'pt_editForm'
 manage = manage_main = pt_editForm
 
 
@@ -361,9 +357,22 @@
 setattr(ZPT, 'source.xml',  ZPT.source_dot_xml)
 setattr(ZPT, 'source.html', ZPT.source_dot_xml)
 
+
+
+class FSZPT(ZPT):
+
+def __init__(self, filename, name):
+self.__name__= name
+PageTemplate.__init__(self, open(filename).read(), 'text/html')
+
+InitializeClass(FSZPT)
+
+
 # Product registration and Add support
-manage_addZPTForm= PageTemplateFile(
-'pt/ptAdd', globals(), __name__='manage_addPageTemplateForm')
+manage_addZPTForm= PageTemplateFile('pt/ptAdd.pt', globals())
+manage_addZPTForm.__name__ = 'manage_addZPTForm'
+#manage_addZPTForm= FSZPT(os.path.join(package_home(globals()), 'pt', 
'ptAdd.pt'), 'manage_addZPTForm')
+#manage_addZPTForm.__name__ = 'manage_addZPTForm'
 
 
 def manage_addZPT(self, id, title=None, text=None,

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-dev] Zope tests: 8 OK

2005-12-09 Thread Zope tests summarizer
Summary of messages to the zope-tests list.
Period Thu Dec  8 12:01:02 2005 UTC to Fri Dec  9 12:01:02 2005 UTC.
There were 8 messages: 8 from Zope Unit Tests.


Tests passed OK
---

Subject: OK : Zope-2_6-branch Python-2.1.3 : Linux
From: Zope Unit Tests
Date: Thu Dec  8 23:19:42 EST 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-December/003746.html

Subject: OK : Zope-2_6-branch Python-2.3.5 : Linux
From: Zope Unit Tests
Date: Thu Dec  8 23:21:12 EST 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-December/003747.html

Subject: OK : Zope-2_7-branch Python-2.3.5 : Linux
From: Zope Unit Tests
Date: Thu Dec  8 23:22:42 EST 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-December/003748.html

Subject: OK : Zope-2_7-branch Python-2.4.2 : Linux
From: Zope Unit Tests
Date: Thu Dec  8 23:24:12 EST 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-December/003749.html

Subject: OK : Zope-2_8-branch Python-2.3.5 : Linux
From: Zope Unit Tests
Date: Thu Dec  8 23:25:42 EST 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-December/003750.html

Subject: OK : Zope-2_8-branch Python-2.4.2 : Linux
From: Zope Unit Tests
Date: Thu Dec  8 23:27:12 EST 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-December/003751.html

Subject: OK : Zope-2_9-branch Python-2.4.2 : Linux
From: Zope Unit Tests
Date: Thu Dec  8 23:28:43 EST 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-December/003752.html

Subject: OK : Zope-trunk Python-2.4.2 : Linux
From: Zope Unit Tests
Date: Thu Dec  8 23:30:13 EST 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-December/003753.html

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Windows Installer for Zope 2.9+

2005-12-09 Thread Sidnei da Silva
On Tue, Dec 06, 2005 at 01:22:23PM -0500, Tim Peters wrote:
| [Sidnei]
|  Indeed. From reading around, seems like the saner thing is to make it
|  a bold warning in the installer that the said dll is required instead
|  of shipping it.
|
| [Tim]
| If you go the Zope3-route, it becomes a non-issue:  the Windows Python
| installer will install msvcr71.dll if needed.  Redistribution there
| isn't a problem because the PSF builds the binaries using a duly
| licensed Microsoft compiler.  It's much fuzzier for derivative works
| (do the PSF's redistribution rights pass through to them?  ask two
| lawyers, get four answers).  Zope Corp could presumably invoke the
| same rights because parts of Zope are compiled with a legitimately
| licensed VC 7.1 -- but that might depend on who does the compliing.

I've discussed with Mark a bit, and we came to a couple
conclusions.

Looks like the MSI installer has some support for 'multiple instance
transforms' (not sure that's the term used in MS docs), but apparently
that requires some build-time tweaking to be enabled.

Another idea is to include the full Python2.4 installer, make the
installer detect a existing Python2.4 install and if not existing then
run the python installer silently.

| [Tim]
| | Another:  I have no idea how the new zpkg-based build process will
| | work with a Zope2-style installer.  A Zope3-style installer is
| | different in many ways (it's a plain distutils-based installer, and
| | requires that the end user get and install Python  pywin32 first).
| | Plan on pain-time here.
| 
|  That's something I can play with :)
| 
| Feedback from users hasn't been exactly glowing, but it's much easier
| to build an installer that way (no externals, no makefiles, no Cygwin
| involved, ...).  Here's how it's done for Zope3; I don't know / can't
| guess what would need to change for Zope2:
| 
| 
http://www.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/ZopeWindowsRelease

Simplifying a lot what the existing Zope 2 installer does, it
basically creates a 'software home', a default 'instance home' and
registers the services. All but the first part is done manually for
Zope 3, so I can see the lack of glow there.

Supposing there is a existing python installation, how difficult is it
to get a distutils-based windows installer to be extracted to a random
directory outside site-packages? My guess is that it's basically unzip
it. If that's the case, we can simplify the Zope 2 inno installer to:

1. include a distutils-based windows installer for the Zope 2 source
2. include some setup scripts

Then on installation

1. find or install according python
2. unpack the distutils-based windows installer into Program
   Files\Zope
3. create a default 'instance home', pointing to the installed python
4. register the services

Steps 2-4 are reasonably simple to me, the tricky one is 1.

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] RFC: Locale-specific Text Collation

2005-12-09 Thread Jim Fulton

When presenting users with ordered text (e.g. sorted lists of options),
simply sorting Unicode strings doesn't provide an ordering that
users in a given locale will find useful.  Various languages have
text sorting conventions that don't agree with the ordering of
Unicode code points. (This is even true for English.  Generally,
users prefer to see text sorted without regard to case.)

A proposal to address this problem is here:

  http://dev.zope.org/Zope3/LocaleSpecificTextCollation

Comments are welcome.

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: [Zope3-dev] RFC: Locale-specific Text Collation

2005-12-09 Thread Stephan Richter
On Friday 09 December 2005 08:58, Jim Fulton wrote:
 A proposal to address this problem is here:

    http://dev.zope.org/Zope3/LocaleSpecificTextCollation

 Comments are welcome.

+1 as said on IRC.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Re: [Zope3-dev] RFC: Locale-specific Text Collation

2005-12-09 Thread Tino Wildenhain

Stephan Richter schrieb:

On Friday 09 December 2005 08:58, Jim Fulton wrote:


A proposal to address this problem is here:

  http://dev.zope.org/Zope3/LocaleSpecificTextCollation

Comments are welcome.



+1 as said on IRC.


AOL! err. I mean:

+1

Tino.
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: RFC: Locale-specific Text Collation

2005-12-09 Thread Florent Guillaume

Jim Fulton wrote:

When presenting users with ordered text (e.g. sorted lists of options),
simply sorting Unicode strings doesn't provide an ordering that
users in a given locale will find useful.  Various languages have
text sorting conventions that don't agree with the ordering of
Unicode code points. (This is even true for English.  Generally,
users prefer to see text sorted without regard to case.)

A proposal to address this problem is here:

  http://dev.zope.org/Zope3/LocaleSpecificTextCollation

Comments are welcome.


+1, no comment :)

Florent

--
Florent Guillaume, Nuxeo (Paris, France)   CTO, Director of RD
+33 1 40 33 71 59   http://nuxeo.com   [EMAIL PROTECTED]
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: Please vote about conflict errors logging

2005-12-09 Thread Florent Guillaume

Ok after a week the consensus is pretty much in favor of
1. INFO
2. no traceback
3. ERROR

So here's what I'll do:

1. There's enough votes for BLATHER that I'll add zope.conf option to change 
the level, but it will default to INFO.


2. No traceback will be logged anymore. Note that you'll still have the 
traceback from point 3.


3. Here maybe things were unclear. Everybody agrees that the error should 
happen at ERROR level, but I must point out again that no explicit logging 
is needed because it is already done if you configure error_log to copy 
exceptions to the event.log.


So I propose another little change: have the error_log copy to event.log be 
the default behaviour. Today the default is off.


Florent


Florent Guillaume wrote:
Please vote for the level at which you want to log retried conflict  
errors. These are the ConflictErrors that aren't returned to the user  
but automatically retried by the Zope publisher.


1. Do you want these ConflictErrors retried logs to be at level:
- INFO
- BLATHER
- DEBUG
- not logged
- other

2. In addition, please specify if you feel those retried  ConflictErrors 
should have their full traceback logged?

- Yes, with traceback
- No, without traceback

3. Finally, please tell us if the ConflictErrors that *can't* be  
retried (and are returned to the user as an error, and are also  logged 
to the error_log) should be additionally explicitely logged to  the 
event log, and at which level:

- ERROR
- not logged
- other

(Also, if you feel the logging should be different between 2.8 and  2.9, 
please say so.)


I'll wait until Wednesday morning to collect results.



--
Florent Guillaume, Nuxeo (Paris, France)   CTO, Director of RD
+33 1 40 33 71 59   http://nuxeo.com   [EMAIL PROTECTED]
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] RFV: Unicode in Zope 2

2005-12-09 Thread Jim Fulton


A few weeks ago, I mentioned 3 big things I'd like to see for
merging Zope 2 and Zope 3:

- Common Publisher

- Common Security frameworks

- Common ZPT implementations

I forgot a very important need:

- Common approach to Unicode

In particular, In Zope 3, all text is stored and managed as Unicode.
The publisher decodes request data and encodes response data.  The vast
majority of application and library code can ignore encoding issues.
(The exceptions are applications and frameworks that need to exhange
text with non-Unicode-aware external systems.)  This has provided
great simplifications and allowed us to avoid common pitfals from
mixing Unicode and encoded text.

We need to migrate Zope 2 to use a similar strategy.  We need volunteers
to brainstorm how this can be done and make one or more proposals.
This is likely a prerequisite for finishing the publisher and ZPT
work.

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: [Zope-Checkins] SVN: Zope/branches/ajung-zpt-integration/lib/python/Products/ZPT/ZPT.py eeek...Zope 3 ZPTs now work in Zope 2 :-)

2005-12-09 Thread Sidnei da Silva
On Fri, Dec 09, 2005 at 09:25:51AM -0500, Andreas Jung wrote:
| +try:
| +from webdav.Lockable import ResourceLockedError
| +from webdav.WriteLockInterface import WriteLockInterface
| +SUPPORTS_WEBDAV_LOCKS = 1
| +except ImportError:
| +SUPPORTS_WEBDAV_LOCKS = 0


Never understood this. The interface has been there since when? Zope
2.6? Why is it in a try: except in new code?

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Re: Please vote about conflict errors logging

2005-12-09 Thread Paul Winkler
On Fri, Dec 09, 2005 at 03:45:18PM +0100, Florent Guillaume wrote:
 So I propose another little change: have the error_log copy to event.log be 
 the default behaviour. Today the default is off.

+100
 
-- 

Paul Winkler
http://www.slinkp.com
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Re: Please vote about conflict errors logging

2005-12-09 Thread Jens Vagelpohl


On 9 Dec 2005, at 14:45, Florent Guillaume wrote:
So I propose another little change: have the error_log copy to  
event.log be the default behaviour. Today the default is off.


+1

jens

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Re: Please vote about conflict errors logging

2005-12-09 Thread Andrew Sawyers
On Fri, 2005-12-09 at 15:45 +0100, Florent Guillaume wrote:

 So I propose another little change: have the error_log copy to event.log be 
 the default behaviour. Today the default is off.
 
 Florent
 

+1

A

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Re: Please vote about conflict errors logging

2005-12-09 Thread Dieter Maurer
Florent Guillaume wrote at 2005-12-9 15:45 +0100:
 ...
So I propose another little change: have the error_log copy to event.log be 
the default behaviour. Today the default is off.

+1



-- 
Dieter
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: Please vote about conflict errors logging

2005-12-09 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Florent Guillaume wrote:
 Ok after a week the consensus is pretty much in favor of
 1. INFO
 2. no traceback
 3. ERROR
 
 So here's what I'll do:
 
 1. There's enough votes for BLATHER that I'll add zope.conf option to
 change the level, but it will default to INFO.

OK, I can live with that.  I was going to suggest a config option, but
defaulted the other way.

 2. No traceback will be logged anymore. Note that you'll still have the
 traceback from point 3.
 
 3. Here maybe things were unclear. Everybody agrees that the error
 should happen at ERROR level, but I must point out again that no
 explicit logging is needed because it is already done if you configure
 error_log to copy exceptions to the event.log.
 
 So I propose another little change: have the error_log copy to event.log
 be the default behaviour. Today the default is off.

+1 to that (as long as we leave Unauthorized, NotFound, and Redirect
excluded by default).


Tres.
- --
===
Tres Seaver  +1 202-558-7113  [EMAIL PROTECTED]
Palladion Software   Excellence by Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDmfRJ+gerLs4ltQ4RAnRoAKCiWk45LPc55C71Uuji6qGHgfEnfgCfbHvr
fpKYRC+teAopydRnW6esJmA=
=IR1c
-END PGP SIGNATURE-

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Windows Installer for Zope 2.9+

2005-12-09 Thread Tim Peters
...

[Sidnei da Silva]
 Simplifying a lot what the existing Zope 2 installer does, it
 basically creates a 'software home', a default 'instance home' and
 registers the services. All but the first part is done manually for
 Zope 3, so I can see the lack of glow there.

There's also that Zope2 sticks Python inside of Zope, but Zope3 sticks
Zope inside of Python.  A consequence is that you can't install more
than one instance of Zope3 under a single Windows account, but can
install any number of Zope2s.  In the other direction, it's always a
puzzle for Zope2 Windows users to figure out how to give their Zope
access to packages installed in their (own, separate) Python.  For
Zope3 that's a no-brainer.

 Supposing there is a existing python installation, how difficult is it
 to get a distutils-based windows installer to be extracted to a random
 directory outside site-packages?

distutils has no support for that.

 My guess is that it's basically unzip it.

What are you trying to accomplish?  (I know you're trying to push code
into some directory other than under Lib/site-packages, but I don't
know which code or why.)

 If that's the case, we can simplify the Zope 2 inno installer to:

 1. include a distutils-based windows installer for the Zope 2 source
 2. include some setup scripts

 Then on installation

 1. find or install according python

Note that Zope also needs pywin32 to be installed.

 2. unpack the distutils-based windows installer into Program
   Files\Zope

OK, so you're trying to preserve that ... what?  You're neither
sticking Python inside Zope nor Zope inside Python?

BTW,  _how_ do you unpack this at install time?  You can't, for
example, assume that a Windows box has any unzip utility (let alone
some specific one).  So this part would probably be simpler if you
point Inno at a Zope tree and let _it_ package it and unpack it. 
Maybe the way to get such a tree is to build a distutils installer for
Zope and run it on your own box, pointing Inno at the tree it creates,
then throw the distutils installer away 0.3 wink.

 3. create a default 'instance home', pointing to the installed python

An instance home _certainly_ doesn't belong inside the user's Python
-- but maybe I don't know what you mean by these words (I'm probably
misreading pointing to).  It should be possible to create any number
of distinct instance homes.

 4. register the services

 Steps 2-4 are reasonably simple to me, the tricky one is 1.

Maybe somone will hit me for this ;-), but we have Inno code for #1 in
one of our other installers.  It goes like this:

[Code]
var
// Path to the user's Python installation, found from the registry.
// Procedure SetPythonInstallPath deduces this.
gPythonInstallPath: String;

function InitializeSetup(): boolean;
begin
gPythonInstallPath := '';   // don't know yet
Result := True;
end;

...

// Look up Python's install path in the registry.  Use HKCU first, because
// a user-only instance is supposed to take precedence.  If no Python is
// installed, this will leave gPythonInstallPath as an empty string.
procedure SetPythonInstallPath();
begin
RegQueryStringValue(HKCU,
'Software\Python\PythonCore\2.4\InstallPath',
 '',
 gPythonInstallPath);
if gPythonInstallPath = '' then // not in HKCU, so try HKLM
RegQueryStringValue(HKLM,
'Software\Python\PythonCore\2.4\InstallPath',
'',
gPythonInstallPath);
end;

// Expose gPythonInstallPath to {code:...} clauses.
function GetPythonDir(Default: String): String;
begin
Result := gPythonInstallPath;
end;

...

procedure SetupDependencies();
var
PythonSetupFile: String;
PyWin32SetupFile: String;
...
begin
PythonSetupFile := 'python-2.4.2.msi';
PyWin32SetupFile := 'pywin32-205.win32-py2.4.exe';
...
// Setup python, unless it is already installed.
SetPythonInstallPath();
if gPythonInstallPath = '' then begin
if not ShellExec('open', ExpandConstant('{tmp}\files\' +
PythonSetupFile),
 '', '', SW_SHOW, ewWaitUntilTerminated, ErrorCode) then
   FatalError('Unable to install python');
// Try again to find the install path.
SetPythonInstallPath();
if gPythonInstallPath = '' then
// This shouldn't happen ... but if it does, we dare not leave this
// variable empty:  the installer blithely goes on to copy files
// into the Windows system32 directory if we do.  That should never
// be allowed.
gPythonInstallPath := ExpandConstant('{tmp}\NoPython\');
end;

// Setup pywin32
if not Exec(ExpandConstant('{tmp}\files\' + PyWin32SetupFile), '', '',
 SW_SHOW, ewWaitUntilTerminated, ErrorCode) then
FatalError('Unable to install PythonWin32');

...

The key is that the Python installer creates a registry entry, so you
can guess whether Python is installed by looking at that.  

Re: [Zope-dev] Windows Installer for Zope 2.9+

2005-12-09 Thread Sidnei da Silva
On Fri, Dec 09, 2005 at 10:19:57PM -0500, Tim Peters wrote:
|  Supposing there is a existing python installation, how difficult is it
|  to get a distutils-based windows installer to be extracted to a random
|  directory outside site-packages?
| 
| distutils has no support for that.
| 
|  My guess is that it's basically unzip it.
| 
| What are you trying to accomplish?  (I know you're trying to push code
| into some directory other than under Lib/site-packages, but I don't
| know which code or why.)

That would be Zope's code.

|  If that's the case, we can simplify the Zope 2 inno installer to:
| 
|  1. include a distutils-based windows installer for the Zope 2 source
|  2. include some setup scripts
| 
|  Then on installation
| 
|  1. find or install according python
| 
| Note that Zope also needs pywin32 to be installed.

Right.

|  2. unpack the distutils-based windows installer into Program
|Files\Zope
| 
| OK, so you're trying to preserve that ... what?  You're neither
| sticking Python inside Zope nor Zope inside Python?
| 
| BTW,  _how_ do you unpack this at install time?  You can't, for
| example, assume that a Windows box has any unzip utility (let alone
| some specific one).  So this part would probably be simpler if you
| point Inno at a Zope tree and let _it_ package it and unpack it. 
| Maybe the way to get such a tree is to build a distutils installer for
| Zope and run it on your own box, pointing Inno at the tree it creates,
| then throw the distutils installer away 0.3 wink.

Yeah, why not. That would work, I think.

|  3. create a default 'instance home', pointing to the installed python
| 
| An instance home _certainly_ doesn't belong inside the user's Python
| -- but maybe I don't know what you mean by these words (I'm probably
| misreading pointing to).  It should be possible to create any number
| of distinct instance homes.

I mean't 'using the user's installed python'.

|  4. register the services
| 
|  Steps 2-4 are reasonably simple to me, the tricky one is 1.
| 
| Maybe somone will hit me for this ;-), but we have Inno code for #1 in
| one of our other installers.  It goes like this:
| 
| [Code]
| var
| // Path to the user's Python installation, found from the registry.
| // Procedure SetPythonInstallPath deduces this.
| gPythonInstallPath: String;
| 
| function InitializeSetup(): boolean;
| begin
| gPythonInstallPath := '';   // don't know yet
| Result := True;
| end;
| 
| ...
| 
| // Look up Python's install path in the registry.  Use HKCU first, because
| // a user-only instance is supposed to take precedence.  If no Python is
| // installed, this will leave gPythonInstallPath as an empty string.
| procedure SetPythonInstallPath();
| begin
| RegQueryStringValue(HKCU,
| 'Software\Python\PythonCore\2.4\InstallPath',
|  '',
|  gPythonInstallPath);
| if gPythonInstallPath = '' then // not in HKCU, so try HKLM
| RegQueryStringValue(HKLM,
| 'Software\Python\PythonCore\2.4\InstallPath',
| '',
| gPythonInstallPath);
| end;
| 
| // Expose gPythonInstallPath to {code:...} clauses.
| function GetPythonDir(Default: String): String;
| begin
| Result := gPythonInstallPath;
| end;
| 
| ...
| 
| procedure SetupDependencies();
| var
| PythonSetupFile: String;
| PyWin32SetupFile: String;
| ...
| begin
| PythonSetupFile := 'python-2.4.2.msi';
| PyWin32SetupFile := 'pywin32-205.win32-py2.4.exe';
| ...
| // Setup python, unless it is already installed.
| SetPythonInstallPath();
| if gPythonInstallPath = '' then begin
| if not ShellExec('open', ExpandConstant('{tmp}\files\' +
| PythonSetupFile),
|  '', '', SW_SHOW, ewWaitUntilTerminated, ErrorCode) 
then
|FatalError('Unable to install python');
| // Try again to find the install path.
| SetPythonInstallPath();
| if gPythonInstallPath = '' then
| // This shouldn't happen ... but if it does, we dare not leave 
this
| // variable empty:  the installer blithely goes on to copy files
| // into the Windows system32 directory if we do.  That should 
never
| // be allowed.
| gPythonInstallPath := ExpandConstant('{tmp}\NoPython\');
| end;
| 
| // Setup pywin32
| if not Exec(ExpandConstant('{tmp}\files\' + PyWin32SetupFile), '', '',
|  SW_SHOW, ewWaitUntilTerminated, ErrorCode) then
| FatalError('Unable to install PythonWin32');
| 
| ...
| 
| The key is that the Python installer creates a registry entry, so you
| can guess whether Python is installed by looking at that.  Note that
| this Inno code doesn't try to do silent installs -- and it always runs
| the pywin32 installer.

Looks great. That will be very useful if I ever get around fixing the
Zope 2 installer, which I hope I will.

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com

Re: [Zope] Zope 2.8.4 install on Suse

2005-12-09 Thread Luca Olivetti

En/na Jens Vagelpohl ha escrit:

Whaat you really need to do is *ditch* those OS-supplied Python packages 
and compile it yourself for Zope. It's easy and quick. Get the 2.3.5 
tarball from python.org and after that it's a matter of 
configure/make/make install.


unless you're on x86_64

Bye
--
Luca Olivetti
Wetron Automatización S.A. http://www.wetron.es/
Tel. +34 93 5883004  Fax +34 93 5883007
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: zdsock

2005-12-09 Thread Chris Withers

John Poltorak wrote:


Are you saying that Zope cannot be restarted through ZMI on Windows?


Who does that anyway?

Even on unix, I use zopectl restart, my production zope stuff on windows 
is just scheduled tasks running from Task Scheduler...


At the moment, the problem is being able to provide an alternative socket 
name via a command line parameter which is a feature that is supposed to  
be already provided by zdctl, but no one seems to know how it works, so I 
have no way of knowing whether it can be made to work on my OS or not.


Well, I'm afraid that's how open source works. Yours is the itch, better 
get scratching ;-)


Tres gave you some hints, in that basically you want to surface that 
ooption in zope.conf. Reading the code in the Zope.Startup package would 
be where I'd start, although I warn you it's a little contorted :-S


cheers,

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Zope refusing to serve our large files (180M+)

2005-12-09 Thread Chris Withers

Chris Wilton wrote:

If there's a 500 error in the trace or access log, there should
be something in your error_log too.  Traceback please?


None. Zippo. Squat.


You're looking in the wrong place.
Go to the root of the ZMI in a web browser. You'll see and object called 
error_log, that's what Paul was talking about. Unfortunately, entries in 
this don't persist across Zope restarts, so you want to check the box 
that says copy events to the event log, then they'll show up where 
you're currently looking...



And an equally unhelpful entry in the trace log:
--
2005-12-08T18:45:23 B 1131651340 2005-12-08T18:45:23 GET
/dali/downloads/180M.tar
--
2005-12-08T18:45:23 I 1131651340 2005-12-08T18:45:23 0
--
2005-12-08T18:45:24 A 1131651340 2005-12-08T18:45:24 500 272
--
2005-12-08T18:45:24 E 1131651340 2005-12-08T18:45:24


Well, Chris McDonough is your man for reading these runes ;-)


Thanks for the advice on ftp; I might look at newer Zopes, but we'd
rather not have to use zope's ftp (for reasons including those you
pointed out), as our content should be reachable through the http
server; I'd rather tackle that problem.


Tried WebDAV?


Any obvious config settings I might be missing?


Well, for your needs, you should really be looking at Tramlines or 
Railroad from Infrae...


Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] ZSQL batching with dtml-in

2005-12-09 Thread Chris Withers

Ed Colmar wrote:


Will the database be queried for all results, and only have 20 
displayed, or will the database just return the 20 that are needed?


The database will get hammered every time ;-)

There was a thread between myself and Charlie from eGenix on the zope-db 
list earlier this week...


...and stop using dtml!

*grinz*

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] [ANN] TextIndexNG 3.1.3 released

2005-12-09 Thread Andreas Jung


I am pleased to announce the release of TextIndexNG V 3.1.3.

TextIndexNG V 3 is a complete new implementation based on Zope 3 
technologies and can be used both in Zope 2.8 or in Zope 3.


What's new?

- multi-field indexing and query support

- multi-lingual support

- configurable converters (through ZCML)

- new indexing API (allowing you to hook your custom content types with
  TextIndexNG through Zope 3 adapters).


Changes in V 3.1.3:

- some fixed in the Plone integration introduced in V 3.1.2


Requirements:

 - Zope 2.8+, Zope 3.1+


Download:

 http://sf.net/projects/textindexng

Project page:

 http://opensource.zopyx.biz/OpenSource/TextIndexNG3


For installation and documentation issues refer to doc/README.txt from the 
archive. It's basically the same procedure as with former versions except 
you *need* to recompile the extension modules. Windows binaries of the 
required extension modules are currently not available (any volunteers?).


TextIndexNG V 3 is published under the ZPL.


Andreas Jung

   ---
  -   Andreas JungZOPYX Software Development and Consulting -
 -   E-mail: [EMAIL PROTECTED]   Web: www.zopyx.com   -
  --- 




  -

pgpiFGlHGQW2O.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Un-Installing Zope Instances?

2005-12-09 Thread Lennart Regebro
On 12/9/05, Russell Winter [EMAIL PROTECTED] wrote:


 Folks

 Is there a need to un-install a Zope Instance?

Only if you want it removed. :)

rm -rf works fine.

 I had installed under /directoryOne

 I copied it zope to /directoryTwo

Well, that can be done, but it's tricky. It'e easier to
mkzopeinstance /directoryTwo reinstalling the products and copying
over the data.fs, IMO.

 From this i assume that the databse also holds information about previous
 locations and instances,

No, but some configuration files does, and if you have local products
you may want to delete all *.pyc files.

 un-install my old copy properly somehow, not just delete the directory, is
 that correct?

No, you can just delete the instance directory. It's the copying that
is the problem. The Data.fs can generally be copied without problems
though.

--
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Hooks for methods other than GET/POST on port 80?

2005-12-09 Thread Roman Susi

Andreas Jung wrote:




--On 9. Dezember 2005 08:04:04 +0200 Roman Susi [EMAIL PROTECTED] wrote:


Chris Withers wrote:


Roman Susi wrote:


Even if it is in my code, it is still too bad to get down the whole
Zope server. Also, it was confirmed as a bug.




Where and who by?




At Zope.org issue tracker by ajung. However, it is not seen as it is
security related.



I did not confirm it as bug. I said that it is possibly a bug but nothing
that worries me so much.

-aj



Hi!

I've found the reason for original bug I hit. The recursion was in my 
code (and gone away after I corrected it). However, the bug I reported 
to Zope.org is still there.
I think its a bug to freeze the whole server by 
maximum-recursion-reached error in a product...



Regards,
Roman

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Hooks for methods other than GET/POST on port 80?

2005-12-09 Thread Andreas Jung



--On 9. Dezember 2005 15:33:38 +0200 Roman Susi [EMAIL PROTECTED] wrote:


Hi!

I've found the reason for original bug I hit. The recursion was in my
code (and gone away after I corrected it). However, the bug I reported to
Zope.org is still there.
I think its a bug to freeze the whole server by maximum-recursion-reached
error in a product...


There is always a chance to bring Zope down by writing bad code. But I 
still do not understand if this is really a Zope problem or just an example 
of stupid code.


-aj

pgpcVHysRgaA9.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Job Opportunity with Revolution Health Group

2005-12-09 Thread Andrew Sawyers
I'll keep this short, since I wasn't sure of the list policy regarding
these types of posts.

Revolution Health Group is seeking python and Zope programmers for
several positions.  If anyone is interested in exiciting job
opportunities with a well funded startup; feel free to email me offlist
for more details.  General company info can be found at
www.recolution.com and Google. 

Thanks,

Andrew Sawyers
Revolution Health Group
[EMAIL PROTECTED]



___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] resolving conflict errors

2005-12-09 Thread Dieter Maurer
Dennis Allison wrote at 2005-12-8 18:29 -0800:
 ...
The problem I am trying to resolve appears to be load related.  The
observed symptom is that (some) session variables spontaneously disappear.  

It is very surprising that some (!) session variables should
spontaneously disappear -- in fact it is unbelievable.

  The session machinery has in no way any preference for
  some variable stored in the session. They are all treated
  in the same way. It looks almost impossible that some
  variables vanish spontaneously while others remain.

The following is quite normal (for buggy applications):

 The value of session variables seems to be reset spontaneously.

 This happens when the value is a mutable object and
 the mutable object is mutated without a notice for the session.

 Then, the modified value is available in this cache
 (until the session is flushed from it). Other caches
 see the old value.
 Because it is apparently non-deterministic which cache
 is used for a request, the observed session value
 seems to switch between different values.

It might be possible (though I have never seen a hint towards this)
that due to some bug the session is reset to an earlier state
(which did not yet have the session variables you now miss).
In this case, you should not only see some variables missing but
the others to have (potentially) outdated values.


-- 
Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: zdsock

2005-12-09 Thread John Poltorak
On Fri, Dec 09, 2005 at 10:48:49AM +, Chris Withers wrote:
 John Poltorak wrote:
  
  Are you saying that Zope cannot be restarted through ZMI on Windows?
 
 Who does that anyway?
 
 Even on unix, I use zopectl restart, 

That is the point - zopectl uses a socket - 'zdsock'.

  At the moment, the problem is being able to provide an alternative socket 
  name via a command line parameter which is a feature that is supposed to  
  be already provided by zdctl, but no one seems to know how it works, so I 
  have no way of knowing whether it can be made to work on my OS or not.
 
 Well, I'm afraid that's how open source works. Yours is the itch, better 
 get scratching ;-)
 
 Tres gave you some hints, in that basically you want to surface that 
 ooption in zope.conf. Reading the code in the Zope.Startup package would 
 be where I'd start, although I warn you it's a little contorted :-S

Well maybe you can explain what is the point of the '-s' flag or 
sample.conf. Is it meant to be helpful? I don't even see it mentioned in 
the documentation. Am I missing something?

 
 cheers,
 
 Chris
 
 -- 
 Simplistix - Content Management, Zope  Python Consulting
 - http://www.simplistix.co.uk
 


-- 
John



___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


RE: [Zope] TextIndexNG3 clears on restart?

2005-12-09 Thread Dan Pozmanter
Bummer, errors that don't readily reproduce are lovely.
I guess just ignore this unless it pops up again from someone else.
Thanks for the help.
___
 
Daniel Pozmanter
Siteworx, Inc.
 
Festina Lente - Gaius Julius

-Original Message-
From: Andreas Jung [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 09, 2005 12:30 AM
To: Dan Pozmanter; Andreas Jung; zope@zope.org
Subject: RE: [Zope] TextIndexNG3 clears on restart?



--On 8. Dezember 2005 16:25:16 -0500 Dan Pozmanter [EMAIL PROTECTED]
wrote:

 Changing the storage from default to term_frequencies seems to fix the

 problem.

Nothing I can reproduce...it works perfectly independent of the used
storage or stemmer settings.

-aj
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Remote Calendar Server

2005-12-09 Thread John Poltorak

What do I need to do to set up Zope as a remote calendar server for 
Mozilla?


-- 
John


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: Job Opportunity with Revolution Health Group

2005-12-09 Thread Andrew Sawyers
I apologize for this follow-on post, I typo'd the company URL and wanted
to clear that up:  www.revolution.com

No more from me on this.
Thanks,

Andrew

On Fri, 2005-12-09 at 12:11 -0500, Andrew Sawyers wrote:
 I'll keep this short, since I wasn't sure of the list policy regarding
 these types of posts.
 
 Revolution Health Group is seeking python and Zope programmers for
 several positions.  If anyone is interested in exiciting job
 opportunities with a well funded startup; feel free to email me offlist
 for more details.  General company info can be found at
 www.recolution.com and Google. 
 
 Thanks,
 
 Andrew Sawyers
 Revolution Health Group
 [EMAIL PROTECTED]
 
 

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: Re: why will FastCGI not be supported in the Future.

2005-12-09 Thread Alexander Limi
On Wed, 07 Dec 2005 01:39:37 -0800, Chris Withers  
[EMAIL PROTECTED] wrote:



Dieter Maurer wrote:

The original poster explained his wish to retain FCGI:
   It reuses an existing connection between Apache and Zope
  while (he thinks and I might believe it) the recommended
  mod_proxy way each time opens a new connection.
   Thus, FastCGI might be more efficient.


Show me some evidence proving that fcgi or mod_proxy is the significant  
limiting performance factor in a setup involving zope and I'll take this  
seriously ;-)


FWIW, we did some rudimentary benchmarking with Zope + Apache using  
mod_proxy vs. Zope + FastCGI + lighttpd (a very fast and lightweight web  
server). There was no difference in performance since Zope is so slow in  
the first place - so it didn't make any difference.


--
_

 Alexander Limi · Chief Architect · Plone Solutions · Norway

 Consulting · Training · Development · http://www.plonesolutions.com
_

  Plone Co-Founder · http://plone.org · Connecting Content
  Plone Foundation · http://plone.org/foundation · Protecting Plone

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: Remote Calendar Server

2005-12-09 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

John Poltorak wrote:
 What do I need to do to set up Zope as a remote calendar server for 
 Mozilla?

Depends on what you need.  If you just want a place to store your
'.ical' files, plain-old Zope2 with DAV is all you need.  If you want
the server to parse / render calendar data (instead of just storing it),
then you could look at:

  - schooltool (a Zope3-based calendar server)

  - CPSCaledner (don't know its feature set, but builds on Zope2,
CMF, and CPS).


Tres.
- --
===
Tres Seaver  +1 202-558-7113  [EMAIL PROTECTED]
Palladion Software   Excellence by Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDmkFH+gerLs4ltQ4RAqAXAKDM0uwmmS/53jyMbR0TdGmMYiO5JACfZD/3
NkKCXLbyQFWEHUbbwvLKywg=
=PZdF
-END PGP SIGNATURE-

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Simple User Folder Setup

2005-12-09 Thread Infor Gates
Dear zopistI am having problems in setting up Simple User Folder.Error Message:Error Type: UnconfiguredException   Error Value: Addition of users has not been configuredI have googled around for an answer. However, there is very little info on it.My Configuration: Zope2.8.4 / Windows XP Pro / PostgresqlI have copied all (addUser.pys, addUser.sql, editUser.pys editUser.sql, deleteUser.pys deleteUser.sql, getUserIds.pys, getUserIds.sql, getUserDetails.pys, getUserDetails.sql) into the /TEST/acl_users/Contents page as advised in README.Do anyone have similar experiences?Thank you.
	
		Yahoo! Shopping 
Find Great Deals on Holiday Gifts at Yahoo! Shopping ___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Simple User Folder Setup

2005-12-09 Thread David H




Infor Gates wrote:

  Dear zopist
  
I am having problems in setting up Simple User Folder.
Error Message:
  Error Type: UnconfiguredException
  Error Value: Addition of users has not been configured
  
  
I have googled around for an answer. However, there is very little info
on it.
My Configuration: Zope2.8.4 / Windows XP Pro / Postgresql
I have copied all (addUser.pys, addUser.sql, editUser.pys
editUser.sql, deleteUser.pys deleteUser.sql, getUserIds.pys,
getUserIds.sql, getUserDetails.pys, getUserDetails.sql) into the
/TEST/acl_users/Contents page as advised in README.
  
Do anyone have similar experiences?
  
Thank you.
  
   
  

Infor,

Take a look at the source SimpleUserfolder.py. That error occurs when
the method:

 def _doAddUser(self, name, password, roles, domains, **kw):

cannot acquire the method "addUser".

You should ensure that all methods (addUser, getUserDetails,
getUserName, etc) are either in the folder or acquirable by the folder
that you drop a Simple User Folder object in.

HTH,
David





___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: [ZF] Zope Foundation IRC - Reminder

2005-12-09 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Rob Page wrote:

 I wanted to send a brief reminder about the upcoming
 IRC to discuss the formation of the Zope Foundation.
 Hope to see you there!
 
   o IRC: We have scheduled the following IRCs to
  discuss the docs in real time:
 
  Who:Zope Community
  What:   IRC to discuss Zope Foundation formation
  documents.
  Where:  #zope on irc.freenode.net
 
  When:  #1:  Fri, Dec 9, 730a - 9a (US/EST)
 #2:  Tue, Dec 20, 730a - 830a (US/EST)
 
 US/EST is GMT-5.


In case list readers haven't seen it yet:  Chris McDonough has a
transcript of this morning's chat up at:

 http://plope.com/Members/chrism/foundation_dec9

BTW,  I'm sorry I couldn't make it this morning: I was waiting to board
a plane in Birmingham.


Tres.
- --
===
Tres Seaver  +1 202-558-7113  [EMAIL PROTECTED]
Palladion Software   Excellence by Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDmmwo+gerLs4ltQ4RAg6lAKDH0wSeSdsP+uMKEBiPZDybR6pZLgCeL0qq
ZLSvRDDhKWDC7J+mNMbmKw0=
=kaMm
-END PGP SIGNATURE-
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: [ZF] Zope Foundation IRC - Reminder

2005-12-09 Thread Chris McDonough
For all of you not playing along, the when of the second chat  
originally presented as:



#2:  Tue, Dec 20, 730a - 830a (US/EST)


... has been changed to 1PM US/EST on Dec. 20 as per the chat  
transcript.


- C


On Dec 10, 2005, at 12:48 AM, Tres Seaver wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Rob Page wrote:


I wanted to send a brief reminder about the upcoming
IRC to discuss the formation of the Zope Foundation.
Hope to see you there!

  o IRC: We have scheduled the following IRCs to
 discuss the docs in real time:

 Who:Zope Community
 What:   IRC to discuss Zope Foundation formation
 documents.
 Where:  #zope on irc.freenode.net

 When:  #1:  Fri, Dec 9, 730a - 9a (US/EST)
#2:  Tue, Dec 20, 730a - 830a (US/EST)

US/EST is GMT-5.



In case list readers haven't seen it yet:  Chris McDonough has a
transcript of this morning's chat up at:

 http://plope.com/Members/chrism/foundation_dec9

BTW,  I'm sorry I couldn't make it this morning: I was waiting to  
board

a plane in Birmingham.


Tres.
- --
===
Tres Seaver  +1 202-558-7113  [EMAIL PROTECTED]
Palladion Software   Excellence by Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDmmwo+gerLs4ltQ4RAg6lAKDH0wSeSdsP+uMKEBiPZDybR6pZLgCeL0qq
ZLSvRDDhKWDC7J+mNMbmKw0=
=kaMm
-END PGP SIGNATURE-
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )



___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )