[Zope-Checkins] SVN: Products.Five/trunk/ Support and tests for site migration from Five.site to Five.component.
Log message for revision 69269: Support and tests for site migration from Five.site to Five.component. Changed: U Products.Five/trunk/CHANGES.txt U Products.Five/trunk/doc/localsite.txt U Products.Five/trunk/site/browser.py U Products.Five/trunk/site/managesite.pt U Products.Five/trunk/site/tests/test_localsite.py U Products.Five/trunk/site/tests/test_utility.py -=- Modified: Products.Five/trunk/CHANGES.txt === --- Products.Five/trunk/CHANGES.txt 2006-07-27 10:03:20 UTC (rev 69268) +++ Products.Five/trunk/CHANGES.txt 2006-07-27 12:33:37 UTC (rev 69269) @@ -24,7 +24,8 @@ (and not on attributes). * The FiveSiteManager classes now work again, but are deprecated for the - new zope.component support. + new zope.component support. There is also a method to migrate Five.site + to zope.component. Five 1.5c (2006-05-29) == Modified: Products.Five/trunk/doc/localsite.txt === --- Products.Five/trunk/doc/localsite.txt 2006-07-27 10:03:20 UTC (rev 69268) +++ Products.Five/trunk/doc/localsite.txt 2006-07-27 12:33:37 UTC (rev 69269) @@ -42,8 +42,15 @@ or programmatically through enableLocalSiteHook(site) turn it into a site. The new setup involves calling enableSite(site) and createing and setting -a site manager. The simplest way to do this programatically is to look -up the components.html view on the site, and calling view.makeSite(). +a site manager. The simplest way to do this manually is to go to the +components.html view of the object you want to make a site, and press the +Make site button. The easist way to do this programmatically, is to look +up the components.html view on the site, and calling view.makeSite(): + +components_view = queryMultiAdapter((self.context, self.request), + Interface, 'components.html') +components_view.makeSite() + As any ObjectManager can be a site there is no longer any need to specially mark the class as being a possible site. @@ -62,7 +69,9 @@ Migrating the actual sites .. -Not Yet Implemented. +Go to the object of the site, and add manage_site.html to the URL to open +the old site management view. There you have a button +Migrate to Five.component. Press it to migrate the site. Experimental forwards compatibility ... @@ -76,7 +85,7 @@ Old site implementation details +=== The rest of this document documents the details of the old site implementation. Everything from here on concerns only the old implementation and is of mainly Modified: Products.Five/trunk/site/browser.py === --- Products.Five/trunk/site/browser.py 2006-07-27 10:03:20 UTC (rev 69268) +++ Products.Five/trunk/site/browser.py 2006-07-27 12:33:37 UTC (rev 69269) @@ -16,7 +16,9 @@ $Id$ from zope.app.component.interfaces import ISite -from zope.app.component.hooks import clearSite +from zope.app.component.hooks import clearSite, setSite +from zope.component import getSiteManager, queryMultiAdapter +from zope.interface import Interface, providedBy from Products.Five.browser import BrowserView from Products.Five.site.localsite import enableLocalSiteHook, disableLocalSiteHook @@ -31,10 +33,16 @@ self.makeSite() elif form.has_key('UPDATE_UNMAKESITE'): self.unmakeSite() +elif form.has_key('UPDATE_MIGRATE'): +self.migrateToFive15() def isSite(self): return ISite.providedBy(self.context) +def isOldSite(self): +from Products.Five.site.interfaces import IFiveSiteManager +return self.isSite() and IFiveSiteManager.providedBy(getSiteManager()) + def makeSite(self): Convert a possible site to a site if self.isSite(): @@ -58,3 +66,30 @@ clearSite() return This object is no longer a site + +def migrateToFive15(self): +all_utilities = self.context.utilities.objectItems() + +self.unmakeSite() +self.context.manage_delObjects(['utilities']) +components_view = queryMultiAdapter((self.context, self.request), +Interface, 'components.html') +components_view.makeSite() +setSite(self.context) + +site_manager = getSiteManager() +for id, utility in all_utilities: +info = id.split('-') +if len(info) == 1: +name = '' +else: +name = info[1] +interface_name = info[0] + +for iface in providedBy(utility): +if iface.getName() == interface_name: +site_manager.registerUtility(utility, iface, name=name) + +
[Zope-Checkins] SVN: Products.Five/trunk/ Now you can use the old registry with the new API for registerig components.
Log message for revision 69271: Now you can use the old registry with the new API for registerig components. BBB support shold be pretty much complete. Changed: U Products.Five/trunk/doc/localsite.txt U Products.Five/trunk/site/localsite.py U Products.Five/trunk/site/tests/test_utility.py -=- Modified: Products.Five/trunk/doc/localsite.txt === --- Products.Five/trunk/doc/localsite.txt 2006-07-27 13:51:25 UTC (rev 69270) +++ Products.Five/trunk/doc/localsite.txt 2006-07-27 14:15:46 UTC (rev 69271) @@ -89,10 +89,8 @@ The rest of this document documents the details of the old site implementation. Everything from here on concerns only the old implementation and is of mainly -hysterical interest: +hysterical interest. - - By default, Zope 3 has a global site which is configured through ZCML. It provides the fallback for all component look-up. Local sites are typically set during traversal, when the traverser encounters an Modified: Products.Five/trunk/site/localsite.py === --- Products.Five/trunk/site/localsite.py 2006-07-27 13:51:25 UTC (rev 69270) +++ Products.Five/trunk/site/localsite.py 2006-07-27 14:15:46 UTC (rev 69271) @@ -16,12 +16,26 @@ $Id$ from zope.interface import implements +from zope.interface.interface import InterfaceClass from zope.component import getGlobalSiteManager from zope.component.interfaces import ComponentLookupError from zope.app.component.interfaces import ISite, IPossibleSite from Acquisition import aq_parent, aq_inner from Products.Five.site.interfaces import IFiveSiteManager, IFiveUtilityRegistry +from operator import xor +def one_of_three(a, b, c): +# Logical table for a three part test where only one can be true: +# 0 0 0: 0 +# 0 0 1: 1 +# 0 1 0: 1 +# 0 1 1: 0 +# 1 0 0: 1 +# 1 0 1: 0 +# 1 1 0: 0 +# 1 1 1: 0 +return xor(xor(a, b), c) and not (a and b and c) + class FiveSiteManager(object): implements(IFiveSiteManager) @@ -89,7 +103,56 @@ def getAllUtilitiesRegisteredFor(self, interface): return self.utilities.getAllUtilitiesRegisteredFor(interface) -def registerUtility(self, interface, utility, name=''): +def registerUtility(self, *args, **kw): +# Can be called with new API: +# component, provided=None, name=u'', info=u'', event=True +# where info and event are ignored, or old api: +# interface, utility, name='' +name = kw.get('name', u'') +interface_kw = kw.get('interface', None) +provided_kw = kw.get('provided', None) +utility_kw = kw.get('utility', None) +component_kw = kw.get('component', None) + +interface = None +utility = None +if len(args) 0: +# Positional argument 1 +if isinstance(args[0], InterfaceClass): +interface = args[0] +else: +utility = args[0] + +if len(args) 1: +if isinstance(args[1], InterfaceClass): +interface = args[1] +else: +utility = args[1] + +if len(args) 2: +if name: +raise TypeError(You can only provide one name) +else: +name = args[2] + +if not one_of_three(interface is not None, +interface_kw is not None, +provided_kw is not None): +raise TypeError(You can specify one and only one interface) +if interface is None: +interface = interface_kw +if interface is None: +interface = provided_kw + +if not one_of_three(utility is not None, +utility_kw is not None, +component_kw is not None): +raise TypeError(You can specify one and only one interface) +if utility is None: +utility = utility_kw +if utility is None: +utility = component_kw + return self.utilities.registerUtility(interface, utility, name) class FiveSite: @@ -121,9 +184,8 @@ def disableLocalSiteHook(obj): Remove __before_traverse__ hook for Local Site -warnings.warn(The disableLocalSiteHook is deprecated and will be removed - in Zope 2.12. \nSee Five/doc/localsite.txt ., - DeprecationWarning, 2) +# This method is of course deprecated too, but issuing a warning is +# silly. disableSite(obj) clearSite() obj.setSiteManager(None) Modified: Products.Five/trunk/site/tests/test_utility.py === --- Products.Five/trunk/site/tests/test_utility.py 2006-07-27 13:51:25 UTC (rev 69270) +++
[Zope-Checkins] SVN: Zope/branches/Zope-2_8-branch/doc/CHANGES.txt Note release which contained Jim's GC work for acquisition wrappers.
Log message for revision 69272: Note release which contained Jim's GC work for acquisition wrappers. Changed: U Zope/branches/Zope-2_8-branch/doc/CHANGES.txt -=- Modified: Zope/branches/Zope-2_8-branch/doc/CHANGES.txt === --- Zope/branches/Zope-2_8-branch/doc/CHANGES.txt 2006-07-27 14:15:46 UTC (rev 69271) +++ Zope/branches/Zope-2_8-branch/doc/CHANGES.txt 2006-07-27 19:43:07 UTC (rev 69272) @@ -415,6 +415,9 @@ - Made WebDAV server distinguishable from the default HTTP server both in the ZMI and in event.log. + - Made Acquisition and derived classes play inside Python's acyclic +garbage collection framework. + - Included BTreeFolder2 Bugs fixed ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/2.9/doc/CHANGES.txt Jim's GC work for acquisition wrappers.
Log message for revision 69273: Jim's GC work for acquisition wrappers. Changed: U Zope/branches/2.9/doc/CHANGES.txt -=- Modified: Zope/branches/2.9/doc/CHANGES.txt === --- Zope/branches/2.9/doc/CHANGES.txt 2006-07-27 19:43:07 UTC (rev 69272) +++ Zope/branches/2.9/doc/CHANGES.txt 2006-07-27 19:44:01 UTC (rev 69273) @@ -4,16 +4,6 @@ Change information for previous versions of Zope can be found in the file HISTORY.txt. - To-do - - - Add cyclic-garbage collection support to C extension classes, - especially to acquisition wrappers. - - N.B: ExtensionClassType already declares that it supports GC - (via the Py_TPFLAGS_HAVE_GC flag), but does not appear to conform - to the rules for such a type laid out in the Python docs: - http://docs.python.org/api/supporting-cycle-detection.html - Zope 2.9.5 (unreleased) Bugs fixed ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/trunk/doc/CHANGES.txt Note Jim's GC work for acquisition wrappers (landed in 2.8.0b2).
Log message for revision 69275: Note Jim's GC work for acquisition wrappers (landed in 2.8.0b2). Changed: U Zope/trunk/doc/CHANGES.txt -=- Modified: Zope/trunk/doc/CHANGES.txt === --- Zope/trunk/doc/CHANGES.txt 2006-07-27 19:46:12 UTC (rev 69274) +++ Zope/trunk/doc/CHANGES.txt 2006-07-27 19:53:36 UTC (rev 69275) @@ -4,16 +4,6 @@ Change information for previous versions of Zope can be found in the file HISTORY.txt. - To-do - - - Add cyclic-garbage collection support to C extension classes, - especially to acquisition wrappers. - - N.B: ExtensionClassType already declares that it supports GC - (via the Py_TPFLAGS_HAVE_GC flag), but does not appear to conform - to the rules for such a type laid out in the Python docs: - http://docs.python.org/api/supporting-cycle-detection.html - Trunk (unreleased) Restructuring ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-dev] buildbot failure in Zope branches 2.10 2.4 Windows 2000 zc-bbwin2
The Buildbot has detected a failed build of Zope branches 2.10 2.4 Windows 2000 zc-bbwin2. Buildbot URL: http://buildbot.zope.org/ Build Reason: changes Build Source Stamp: 6765 Blamelist: adamg,benji,benji_york,dobe,dominikhuber,fdrake,gotcha,jens,regebro,tseaver BUILD FAILED: failed failed slave lost sincerely, -The Buildbot ___ 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] buildbot failure in Zope branches 2.9 2.4 Windows 2000 zc-bbwin2
The Buildbot has detected a failed build of Zope branches 2.9 2.4 Windows 2000 zc-bbwin2. Buildbot URL: http://buildbot.zope.org/ Build Reason: changes Build Source Stamp: 6764 Blamelist: adamg,benji,benji_york,dobe,dominikhuber,fdrake,gotcha,jens,regebro,tseaver BUILD FAILED: failed failed slave lost sincerely, -The Buildbot ___ 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] buildbot failure in Zope trunk 2.4 Windows 2000 zc-bbwin6
The Buildbot has detected a failed build of Zope trunk 2.4 Windows 2000 zc-bbwin6. Buildbot URL: http://buildbot.zope.org/ Build Reason: changes Build Source Stamp: 6766 Blamelist: adamg,benji,benji_york,dobe,dominikhuber,fdrake,gotcha,jens,regebro,tseaver BUILD FAILED: failed failed slave lost sincerely, -The Buildbot ___ 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] Demostorage w/ ZEO broken again?
Is Demostorage w/ ZEO broken in 2.9 again? I just hit that again ... That's on (Zope 2.9.3-, python 2.4.3, linux2) Error is: File /usr/local/Zope-2.9.3/lib/python/ZODB/BaseStorage.py, line 108, in __init__ self._oid = base._oid AttributeError: 'ClientStorage' object has no attribute '_oid' I had a somewhat working fix for that on Zope 3.2/3.3 but Jim thought just making it ignore the _oid attribute isn't the right thing to do -- and he might be right, I don't know. @Tres: Didn't you tame that beast already a while ago? :) Cheers, Christian -- gocept gmbh co. kg - forsterstraße 29 - 06112 halle/saale - germany www.gocept.com - [EMAIL PROTECTED] - phone +49 345 122 9889 7 - fax +49 345 122 9889 1 - zope and plone consulting and development ___ 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: Demostorage w/ ZEO broken again?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Christian Theune wrote: Christian Theune wrote: Is Demostorage w/ ZEO broken in 2.9 again? I just hit that again ... That's on (Zope 2.9.3-, python 2.4.3, linux2) Error is: File /usr/local/Zope-2.9.3/lib/python/ZODB/BaseStorage.py, line 108, in __init__ self._oid = base._oid AttributeError: 'ClientStorage' object has no attribute '_oid' I had a somewhat working fix for that on Zope 3.2/3.3 but Jim thought just making it ignore the _oid attribute isn't the right thing to do -- and he might be right, I don't know. @Tres: Didn't you tame that beast already a while ago? :) Cheers, Christian - -- === Tres Seaver +1 202-558-7113 [EMAIL PROTECTED] Palladion Software Excellence by Designhttp://palladion.com Is Demostorage w/ ZEO broken in 2.9 again? I just hit that again ... That's on (Zope 2.9.3-, python 2.4.3, linux2) Error is: File /usr/local/Zope-2.9.3/lib/python/ZODB/BaseStorage.py, line 108, in __init__ self._oid = base._oid AttributeError: 'ClientStorage' object has no attribute '_oid' I had a somewhat working fix for that on Zope 3.2/3.3 but Jim thought just making it ignore the _oid attribute isn't the right thing to do -- and he might be right, I don't know. @Tres: Didn't you tame that beast already a while ago? :) After 2.9.3 (but just barely):: $ cd projects/Zope-CVS/ZODB-3_6-branch $ svn log src/ZODB/BaseStorage.py | head - r68676 | tseaver | 2006-06-15 19:33:51 -0400 (Thu, 15 Jun 2006) | 7 lines DemoStorage was unable to wrap base storages without an '_oid' attribute o Most notably, ZEO.ClientStorage (http://www.zope.org/Collectors/Zope/2016). o Forward-ported from 3.4 branch. Tres. - -- === Tres Seaver +1 202-558-7113 [EMAIL PROTECTED] Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEyTkt+gerLs4ltQ4RAt9aAJ0WU3inxXHl3xmTHcO9xIHLYxtPFwCeI5zj npsq6ekS35fsjlWsMHzml+8= =b/8W -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] Running 2 instances of Zope on Apache
I think this might be working but cant tell. Do I have to do something with my windows host file on my server to make these addresses naviagable? -- View this message in context: http://www.nabble.com/Running-2-instances-of-Zope-on-Apache-tf1998979.html#a5516849 Sent from the Zope - General forum at Nabble.com. ___ 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] Running 2 instances of Zope on Apache
It works! I had to change the VirtualHost *:80 entried to VirtualHost dev.commsg6lds VirtualHost live.commsg6lds Also had add IP addresses and domains to windows hosts file. Thanks for all the help! VirtualHost dev.commsg6lds ServerAdmin [EMAIL PROTECTED] ServerName dev.commsg6lds RewriteEngine On RewriteRule ^/(.*) http://localhost:9080/VirtualHostBase/http/dev.commsg6lds:80/test/VirtualHostRoot/$1 [L,P] /VirtualHost VirtualHost live.commsg6lds ServerAdmin [EMAIL PROTECTED] ServerName live.commsg6lds RewriteEngine On RewriteRule ^/(.*) http://localhost:8080/VirtualHostBase/http/live.commsg6lds:80/extranet/VirtualHostRoot/$1 [L,P] /VirtualHost -- View this message in context: http://www.nabble.com/Running-2-instances-of-Zope-on-Apache-tf1998979.html#a5517162 Sent from the Zope - General forum at Nabble.com. ___ 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] VerboseSecurity not working
Why am I getting this on my zope 2.8.5?? 2006-07-27 10:34:07 ERROR Zope.SiteErrorLog http://localhost:8080/test/Real/MoreStatistics/index_html Traceback (most recent call last): File /usr/HOME/peterbe/zope/zope285/lib/python/ZPublisher/Publish.py, line 104, in publish object=request.traverse(path, validated_hook=validated_hook) File /usr/HOME/peterbe/zope/zope285/lib/python/ZPublisher/BaseRequest.py, line 461, in traverse response.unauthorized() File /usr/HOME/peterbe/zope/zope285/lib/python/ZPublisher/HTTPResponse.py, line 685, in unauthorized raise Unauthorized, m Unauthorized: strongYou are not authorized to access this resource./strongp Username and password are not correct. If I try to reach the Control_Panel and hit Esc when the login popup appears I get a proper VerboseSecurity. The method MoreStatistics/index_html is defined like this:: class MoreStatistics(...): blabla # set security on things after security = ClassSecurityInfo() # VIEW_PERMISSION = 'View' security.declareProtected(VIEW_PERMISSION, 'index_html') security.apply(MoreStatistics) InitializeClass(MoreStatistics) Does anybody know why some and not other Unauthorized exceptions are trapped through VerboseSecurity -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com ___ 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] how to use chinese character in zope 2.8.7
zope,hi! i use zope2.8.7 in FC5 chinese edition, in ZMI i can input chinese ,but when i saved,the chinese character change to $#,i want to know how can i solve it.when chinese character is a part of URL,it prompt me invalid URL. thinks! LYNN [EMAIL PROTECTED] 2006-07-27 ___ 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] ZJetDA product and Microsoft Access
Thanks a lot. Yes I know it's crazy but some organisations built up a database over the years and want to stay with that technology. The best way would be to migrate but I can understand why it doesn't happen. On 7/27/06, Philip Kilner [EMAIL PROTECTED] wrote: Hi Michael,michael nt milne wrote: I know it's totally crazy to want to hook Access up with Zope using sql queries but I'd just like to know if it's been done or is possible. Crazy on so many levels.../but/, although I can't tell you anythingabout the DA you are asking about, I can very strongly recommend theeGenix mxODBC DA - using that product, it is possible, and does work. --Regards,PhilKHuman language continually changes, innit.- Stephen Juan-- michael ___ 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] ZJetDA product and Microsoft Access
Hi Michael, michael nt milne wrote: Thanks a lot. Yes I know it's crazy but some organisations built up a database over the years and want to stay with that technology. The best way would be to migrate but I can understand why it doesn't happen. I understand - but the migration from Access to Access-over-SQL-Server is pretty simple, and now that a usable version of SQL Server is free (as in beer) in most cases (certainly those where Access was ever a reasonably choice), I will never use the JET database engine again! -- Regards, PhilK Human language continually changes, innit. - Stephen Juan ___ 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] how to use chinese character in zope 2.8.7
LYNN wrote: zope,hi! i use zope2.8.7 in FC5 chinese edition, in ZMI i can input chinese ,but when i saved,the chinese character change to $#,i want to know how can i solve it.when chinese character is a part of URL,it prompt me invalid URL. thinks! Hi Lynn You need to set the Zope character-encoding to a Unicode encoding. I use utf-8 and it works. UTF-8 is not very efficient for Chinese but I do know it works! You do this two places in Zope: 1: in the zope.conf there should be a line default-zpublisher-encoding utf-8 If there isn't, add it. If it says something else, change it. 2: In the root of the Zope Management Interface, choose the properties tab. In it, add a new property called MANAGEMENT_PAGE_CHARSET of type 'string' with value utf-8. 3: restart Zope This assumes that the rest of your site infrastructure is OK, including Apache encoding. best -- Mark Barratt Text Matters Information design: we help explain things using language | design | systems | process improvement __ phone +44 (0)118 986 8313 email [EMAIL PROTECTED] web http://www.textmatters.com ___ 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] copying folder?
Is there a way to copy a folder on zope, nightly through a cron job and then rename it? I would think I could call lynx or wget from cron with a zope url but I don't know how I would go about doing it. Example of what I want to do: I have a folder in the root of zope called py_scripts I want to copy. Then I want to rename the copied folder py_scripts with today's date on the end of it. I would like cron to do this nightly for me. Any ideas? Thanks, Greg ___ 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] copying folder?
--On 27. Juli 2006 11:02:11 -0500 vl [EMAIL PROTECTED] wrote: Is there a way to copy a folder on zope, nightly through a cron job and then rename it? I would think I could call lynx or wget from cron with a zope url but I don't know how I would go about doing it. Write a PythonScript that use the CopySupport API (manage_copyObjects/manage_pasteObjects) and call this script through your favorite URL fetcher (triggered through cron). -aj E-Publishing, Python, Zope Plone development, Consulting pgpgSYLekEaJC.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] copying folder?
Andreas Jung wrote: --On 27. Juli 2006 11:02:11 -0500 vl [EMAIL PROTECTED] wrote: Is there a way to copy a folder on zope, nightly through a cron job and then rename it? I would think I could call lynx or wget from cron with a zope url but I don't know how I would go about doing it. Write a PythonScript that use the CopySupport API (manage_copyObjects/manage_pasteObjects) and call this script through your favorite URL fetcher (triggered through cron). -aj E-Publishing, Python, Zope Plone development, Consulting Yes, that would work. Thanks. I should of thought of that. ___ 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] copying folder?
Dnia czwartek, 27 lipca 2006 18:11, vl napisał: Andreas Jung wrote: Write a PythonScript that use the CopySupport API (manage_copyObjects/manage_pasteObjects) and call this script through your favorite URL fetcher (triggered through cron). Yes, that would work. Thanks. I should of thought of that. If cron is not a must then take a look at ZopeScheduler product - you will get rid of URL fetcher stuff. -- eXt ___ 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] Newbie: Missing a Variable (TAL/METAL Question)
beno - wrote at 2006-7-26 15:04 -0700: ... that works fine. But I'd like to call the following in that table: tdtal:content metal:use-macro=here/XXX/macros/author/tal:content/td where XXX is the item that changes each time a new item from the batch is called. You might try something like here/?var/ ?var reads the contents of the variable var and inserts this content into the path expression. Note that the value must be a string and that embedded '/' are *not* treated as path separators. -- 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] VerboseSecurity not working
Peter Bengtsson wrote at 2006-7-27 10:51 +0100: Why am I getting this on my zope 2.8.5?? 2006-07-27 10:34:07 ERROR Zope.SiteErrorLog http://localhost:8080/test/Real/MoreStatistics/index_html Traceback (most recent call last): File /usr/HOME/peterbe/zope/zope285/lib/python/ZPublisher/Publish.py, line 104, in publish object=request.traverse(path, validated_hook=validated_hook) File /usr/HOME/peterbe/zope/zope285/lib/python/ZPublisher/BaseRequest.py, line 461, in traverse response.unauthorized() File /usr/HOME/peterbe/zope/zope285/lib/python/ZPublisher/HTTPResponse.py, line 685, in unauthorized raise Unauthorized, m Unauthorized: strongYou are not authorized to access this resource./strongp Username and password are not correct. This Unauthorized is not generated by Zope security mechanism but by the ZPublisher. Apparently, VerboseSecurity does not hook in the ZPublisher. -- 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] copying folder?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 27 Jul 2006, at 13:54, eXt wrote: Dnia czwartek, 27 lipca 2006 18:11, vl napisał: Andreas Jung wrote: Write a PythonScript that use the CopySupport API (manage_copyObjects/manage_pasteObjects) and call this script through your favorite URL fetcher (triggered through cron). Yes, that would work. Thanks. I should of thought of that. If cron is not a must then take a look at ZopeScheduler product - you will get rid of URL fetcher stuff. Using cron has nothing to do with the methodology for executing the script, it doesn't imply URL-whacking is used. A good way to run tasks out of cron if you are using ZEO is either a script that is executed by zopectl run or use someting like this: http://www.simplistix.co.uk/software/zope/stepper jens -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFEyQRaRAx5nvEhZLIRAkPdAKCt9amuZAlYCs+NudfZ9Arsn9lmHgCdGy8R oD34Z2Jz0P7RznEsrBqBpe0= =m7FZ -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] how to use chinese character in zope 2.8.7
Mark Barratt wrote: 2: In the root of the Zope Management Interface, choose the properties tab. In it, add a new property called MANAGEMENT_PAGE_CHARSET of type 'string' with value utf-8. Actually, for hysterical raisins, this needs to be UTF-8 rather than utf-8 in order for the unicode property types to make themselves apparent. Aside from this, use unicode for everything... 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] how to use chinese character in zope 2.8.7
Chris Withers wrote: Mark Barratt wrote: 2: In the root of the Zope Management Interface, choose the properties tab. In it, add a new property called MANAGEMENT_PAGE_CHARSET of type 'string' with value utf-8. Actually, for hysterical raisins, this needs to be UTF-8 rather than utf-8 in order for the unicode property types to make themselves apparent. Aside from this, use unicode for everything... cheers, Chris Chris, Just a correction: hysterical raisins are grapes. :-) ___ 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] how to use chinese character in zope 2.8.7
+---[ David H ]-- | Chris Withers wrote: | | Actually, for hysterical raisins, this needs to be UTF-8 rather than | utf-8 in order for the unicode property types to make themselves apparent. | | Chris, | Just a correction: hysterical raisins are grapes. Q: What's green and commutes? A: An abelian grape. Sorry Maths Geek Humour d8) -- Andrew Milton [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] how to use chinese character in zope 2.8.7
Andrew Milton wrote: +---[ David H ]-- | Chris Withers wrote: | | Actually, for hysterical raisins, this needs to be UTF-8 rather than | utf-8 in order for the unicode property types to make themselves apparent. | | Chris, | Just a correction: hysterical raisins are grapes. Q: What's green and commutes? A: An abelian grape. Sorry Maths Geek Humour d8) The grapes of math? Ok this has to stop. ___ 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 )