Re: [Zope] SiteRoot Issues
nvm, found the answer on google, will try VirtualHostMonster instead. _SUPPRESS_SITEROOT/manage btw, am I on the wrong mailing list or something? Usually, the Zope community is very responsive but I haven't been getting any responses to my emails lately...Hell! Is anyone out there? Cam you guys see me? Earth to Zope, please give me some dope back if you see this :). --- On Mon, 3/30/09, Bobby wrote: > From: Bobby > Subject: [Zope] SiteRoot Issues > To: zope@zope.org > Date: Monday, March 30, 2009, 10:32 AM > Hi, > > I've created a SiteRoot to point to a subfolder of the > root folder /subfolder. Now I can't get back to the root > folder / or remove the SiteRoot entry. How do I get back to > the / root folder or go back and edit/remove the SiteRoot > entry that I've just did. I checked the "Undo" > tab by my SiteRoot entry wasn't there. Thanks for any > suggestions. > > > > > > ___ > 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 )
Re: [Zope] SiteRoot Issues
google "zope removing siteroot" On Mon, Mar 30, 2009 at 11:32, Bobby wrote: > > Hi, > > I've created a SiteRoot to point to a subfolder of the root folder > /subfolder. Now I can't get back to the root folder / or remove the SiteRoot > entry. How do I get back to the / root folder or go back and edit/remove the > SiteRoot entry that I've just did. I checked the "Undo" tab by my SiteRoot > entry wasn't there. Thanks for any suggestions. > > > > > > ___ > 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 )
[Zope] SiteRoot Issues
Hi, I've created a SiteRoot to point to a subfolder of the root folder /subfolder. Now I can't get back to the root folder / or remove the SiteRoot entry. How do I get back to the / root folder or go back and edit/remove the SiteRoot entry that I've just did. I checked the "Undo" tab by my SiteRoot entry wasn't there. Thanks for any suggestions. ___ 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] Touching an object / updating the modification time
On Sat, Mar 28, 2009 at 01:02:58PM +0100, Jakob Schou Jensen wrote: > Hi Paul, > > Doing a > >some_image._p_changed = 1 > > gives me an error: > >"_p_changed" is an invalid attribute name because it starts with "_". > > Do you know what I am doing wrong? Ah, I didn't realize you are doing this in "untrusted" code. http://docs.zope.org/zope2/zope2book/source/ScriptingZope.html#script-security Another approach would be to just change any (small) attribute of the object. Something like: some_image.title = some_image.title -- Paul Winkler http://www.slinkp.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] unittest a component that is using zope.dublincore
Le samedi 28 mars 2009 à 15:46 +0100, Jean-Michel FRANCOIS a écrit : > Hi, > I m trying to make my first content type with zope3. The code is > available there: http://github.com/toutpt/z3weblog.entry/tree > > I m following the second edition of the book "web component developement > with zope3", i know this is not the last edition. So, i m making a > ISized component for my simple content type, with a simple unittest, but > now, i want to use zope.dublincore package and i get an error when i m > launch the tests: > > = > (zope3apps)tou...@linux-tggd:~/workspace/zope3apps/apps/prout> .bin/test > Running tests at level 1 > Running unit tests: > Running: > ... > > Error in test test_size_for_display > (z3weblog.entry.tests.test_size.EntrySizeTestCase) > Traceback (most recent call last): > File > "/home/toutpt/outils/python_system/2.5.4/lib/python2.5/unittest.py", > line 260, in run > testMethod() > File > "/home/toutpt/workspace/zope3apps/apps/prout/src/z3weblog.entry/src/z3weblog/entry/tests/test_size.py", > line 21, in test_size_for_display > msg = self.size.sizeForDisplay() > File > "/home/toutpt/workspace/zope3apps/apps/prout/src/z3weblog.entry/src/z3weblog/entry/size.py", > line 24, in sizeForDisplay > unit, chars = self.sizeForSorting() > File > "/home/toutpt/workspace/zope3apps/apps/prout/src/z3weblog.entry/src/z3weblog/entry/size.py", > line 18, in sizeForSorting > dc = dcI.IZopeDublinCore(self.context) > TypeError: ('Could not adapt', object at 0x839382c>, zope.dublincore.interfaces.IZopeDublinCore>) > > . > > Error in test test_size_for_sorting > (z3weblog.entry.tests.test_size.EntrySizeTestCase) > Traceback (most recent call last): > File > "/home/toutpt/outils/python_system/2.5.4/lib/python2.5/unittest.py", > line 260, in run > testMethod() > File > "/home/toutpt/workspace/zope3apps/apps/prout/src/z3weblog.entry/src/z3weblog/entry/tests/test_size.py", > line 16, in test_size_for_sorting > unit, size = self.size.sizeForSorting() > File > "/home/toutpt/workspace/zope3apps/apps/prout/src/z3weblog.entry/src/z3weblog/entry/size.py", > line 18, in sizeForSorting > dc = dcI.IZopeDublinCore(self.context) > TypeError: ('Could not adapt', object at 0x839382c>, zope.dublincore.interfaces.IZopeDublinCore>) > > > Ran 4 tests with 0 failures and 2 errors in 0.007 seconds. > > Tests with errors: >test_size_for_display (z3weblog.entry.tests.test_size.EntrySizeTestCase) >test_size_for_sorting (z3weblog.entry.tests.test_size.EntrySizeTestCase) > > > > The trace back is very clear, the zope.dublincore components are not > loaded. The question is : what is the best way to load components in > unittests ? Do just i have to load the zcml of zope.dublincore, or do i > have to register only needed components, if so how can i do that ? You can also provide your own adapter and register it for your tests. This example is extracted from zope.app.container unit tests : from datetime import datetime from zope.security import checker from zope.dublincore.interfaces import IZopeDublinCore from zope.app.testing import ztapi class EntrySizeTestCase(unittest.TestCase): def setUp(self): class FauxDCAdapter(object): implements(IZopeDublinCore) __Security_checker__ = checker.Checker( {"created": "zope.Public", "modified": "zope.Public", "title": "zope.Public", }, {"title": "zope.app.dublincore.change"}) def __init__(self, context): pass title = 'faux title' size = 1024 created = datetime(2001, 1, 1, 1, 1, 1) modified = datetime(2002, 2, 2, 2, 2, 2) ztapi.provideAdapter(IZODBWeblogEntry, IZopeDublinCore, FauxDCAdapter) Not tested anyway, but hope will help... Thierry Florac -- Chef de projet intranet/internet Office National des Forêts - Département Informatique 2, Avenue de Saint-Mandé 75570 PARIS Cedex 12 Mél : thierry.flo...@onf.fr Tél. : +33 01.40.19.59.64 Fax. : +33 01.40.19.59.85 ___ 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 add existing folder in Zope
+---[ Tim Nash ]-- | [snip long story about noone paying attention to the actual requirements] I notice none of them installed plone either. -- Andrew Milton a...@theinternet.com.au ___ 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 )