*** tarek has joined #zope3-dev | 00:00 | |
*** d2m has quit IRC | 00:11 | |
*** oferw has quit IRC | 00:27 | |
*** nerdalert has quit IRC | 00:34 | |
*** pbugni has joined #zope3-dev | 00:43 | |
*** lucielejard has quit IRC | 00:48 | |
*** J1m has quit IRC | 00:52 | |
*** RaFromBRC|lunch is now known as RaFromBRC | 00:54 | |
*** schwendinger has quit IRC | 01:23 | |
*** sm has joined #zope3-dev | 01:41 | |
*** tjs has joined #zope3-dev | 01:57 | |
tjs | is there any way a transaction.interfaces.ISynchronizer can be notified on transaction abortions? | 01:59 |
---|---|---|
*** norro has quit IRC | 02:02 | |
tjs | seems like the only way to catch a transaction abort is to forego the ISynchronizer and join an IDataManager to the transaction, which is pretty hacky | 02:06 |
zenwryly | I'm trying to run the Zope3/trunk tests using "make test" from a svn checkout, but the tests keep failing because zope.app.debugskin, zope.app.fssync, and many others aren't present. I'm adding them in one by one but I'm wondering if I'm doing anything wrong. Shouldn't I be able to run "make test" from a Zope3/trunk svn checkout? | 02:17 |
tjs | zenwryly: I'm fairly new to zope3, so this might be wrong, but Id suggest doing a make install, then run the tests via the zope bin test script | 02:20 |
tjs | that way everything will be in your path | 02:20 |
tjs | if you dont want to install potentially broken software use the --prefix option then set your PYTHONPATH up and run the tests on that, then if it fails you can just delete it all, else re-run install without the prefix | 02:22 |
zenwryly | tjs: these are packages that aren't a part of the Zope3/trunk | 02:23 |
tjs | ah | 02:23 |
tjs | sounds a little odd that their test suites are being run if they are not linked in | 02:24 |
* tjs shrugs. | 02:24 | |
zenwryly | I know I've checked out Zope3/trunk in the past and been able to run the tests | 02:26 |
*** malthe_ has quit IRC | 02:36 | |
*** schwendinger has joined #zope3-dev | 02:39 | |
*** pbugni has quit IRC | 03:01 | |
*** jsadjohnson has quit IRC | 03:11 | |
*** jsadjohnson has joined #zope3-dev | 03:11 | |
*** yota has quit IRC | 03:15 | |
*** schwendinger has quit IRC | 03:19 | |
*** reco has quit IRC | 03:24 | |
*** jsadjohnson has quit IRC | 03:39 | |
*** niemeyer has quit IRC | 03:43 | |
*** johnlr1 has joined #zope3-dev | 03:47 | |
*** reco has joined #zope3-dev | 03:47 | |
*** johnlr has quit IRC | 03:51 | |
*** tarek_ has joined #zope3-dev | 03:59 | |
*** tjs has quit IRC | 03:59 | |
*** tarek has quit IRC | 04:03 | |
*** tjs has joined #zope3-dev | 04:51 | |
*** J1m has joined #zope3-dev | 05:06 | |
*** johnlr1 is now known as johnlr | 05:10 | |
*** stub has joined #zope3-dev | 05:10 | |
*** RaFromBRC has quit IRC | 05:10 | |
*** reco has quit IRC | 05:22 | |
*** jodok has quit IRC | 05:34 | |
*** J1m has quit IRC | 05:47 | |
*** huajie has joined #zope3-dev | 05:55 | |
*** rcrafton has quit IRC | 06:07 | |
*** alecm has quit IRC | 06:14 | |
*** reco has joined #zope3-dev | 07:06 | |
*** rcrafton has joined #zope3-dev | 07:19 | |
*** afd__ has joined #zope3-dev | 07:22 | |
*** alecm has joined #zope3-dev | 07:37 | |
*** baijum has joined #zope3-dev | 07:39 | |
*** alecm has quit IRC | 07:48 | |
*** alecm has joined #zope3-dev | 07:48 | |
*** d2m has joined #zope3-dev | 07:55 | |
*** tarek_ has left #zope3-dev | 07:56 | |
*** febb has joined #zope3-dev | 08:02 | |
*** sorin has joined #zope3-dev | 08:05 | |
*** sorin is now known as sorindregan | 08:05 | |
*** yvl has joined #zope3-dev | 08:08 | |
*** jukart has joined #zope3-dev | 08:10 | |
*** Aiste has joined #zope3-dev | 08:10 | |
tjs | anyone able to help with a little thread problem? | 08:13 |
tjs | http://rafb.net/p/J9i1uM47.html | 08:13 |
tjs | is a simple daemon thread I wrote | 08:13 |
tjs | in my test setUp I start it, and in tearDown I call its stopThread() method | 08:13 |
tjs | but the test runner tells me | 08:13 |
tjs | The following test left new threads behind: | 08:14 |
tjs | /home/tjs/f2l/var/zope-3.2.0/lib/python/well3/services/tests/test_sms.txt | 08:14 |
tjs | New thread(s): [<ShortMessageSpoolDaemon(Thread-1, started daemon)>] | 08:14 |
tjs | any ideas? | 08:14 |
*** jukart has quit IRC | 08:17 | |
*** whit has quit IRC | 08:20 | |
*** whit has joined #zope3-dev | 08:20 | |
*** afd__ has quit IRC | 08:26 | |
*** Jell-O-Fishi has quit IRC | 08:35 | |
*** jukart has joined #zope3-dev | 08:40 | |
*** zagy has joined #zope3-dev | 08:43 | |
*** Jell-O-Fishi has joined #zope3-dev | 08:44 | |
*** whit has quit IRC | 08:58 | |
*** zagy has joined #zope3-dev | 08:58 | |
*** ghendi has joined #zope3-dev | 09:07 | |
*** huajie has quit IRC | 09:12 | |
*** deo has quit IRC | 09:12 | |
*** deo has joined #zope3-dev | 09:19 | |
*** rcrafton has quit IRC | 09:27 | |
*** baijum has quit IRC | 09:59 | |
*** harobed has joined #zope3-dev | 10:00 | |
*** tjs has left #zope3-dev | 10:00 | |
*** yvl has quit IRC | 10:05 | |
*** malthe has joined #zope3-dev | 10:06 | |
*** malthe_ has joined #zope3-dev | 10:25 | |
*** yvl has joined #zope3-dev | 10:34 | |
*** ghendi has quit IRC | 10:35 | |
*** malthe_ has quit IRC | 10:38 | |
*** dobee has joined #zope3-dev | 10:39 | |
*** malthe has quit IRC | 10:39 | |
*** baijum has joined #zope3-dev | 10:45 | |
*** huajie has joined #zope3-dev | 10:55 | |
*** jodok has joined #zope3-dev | 11:00 | |
*** bigkevmcd has joined #zope3-dev | 11:01 | |
*** andrew_m has quit IRC | 11:01 | |
*** jodok has quit IRC | 11:09 | |
*** alecm has quit IRC | 11:11 | |
*** tarek has joined #zope3-dev | 11:12 | |
*** pcardune has joined #zope3-dev | 11:14 | |
*** huajie has quit IRC | 11:16 | |
*** jodok has joined #zope3-dev | 11:21 | |
*** jodok_ has joined #zope3-dev | 11:22 | |
*** timte has joined #zope3-dev | 11:23 | |
*** MJ has joined #zope3-dev | 11:31 | |
*** norro has joined #zope3-dev | 11:39 | |
*** jodok has quit IRC | 11:40 | |
*** yota has joined #zope3-dev | 11:40 | |
*** MJ is now known as MJ|busy | 11:51 | |
*** jinty has joined #zope3-dev | 11:52 | |
*** schwendinger has joined #zope3-dev | 11:57 | |
*** malthe has joined #zope3-dev | 12:04 | |
*** philiKON_ has joined #zope3-dev | 12:05 | |
*** richardkan has joined #zope3-dev | 12:09 | |
*** gmat has joined #zope3-dev | 12:11 | |
*** MJ|busy is now known as MJ|out | 12:12 | |
*** philiKON has quit IRC | 12:21 | |
*** timte has quit IRC | 12:29 | |
*** timte has joined #zope3-dev | 12:32 | |
*** MJ|out is now known as MJ|busy | 12:37 | |
*** mgedmin has joined #zope3-dev | 12:48 | |
*** reco has quit IRC | 13:06 | |
*** ignas has joined #zope3-dev | 13:07 | |
*** projekt01 has joined #zope3-dev | 13:07 | |
*** timte has quit IRC | 13:26 | |
*** timte has joined #zope3-dev | 13:29 | |
*** dobee has quit IRC | 13:29 | |
*** Aiste has quit IRC | 13:31 | |
*** andrew_m has joined #zope3-dev | 13:32 | |
*** norro has quit IRC | 13:39 | |
*** dobee has joined #zope3-dev | 13:41 | |
*** dobee has quit IRC | 13:53 | |
*** MJ|busy is now known as MJ|lunch | 13:56 | |
*** huajie has joined #zope3-dev | 13:56 | |
*** timte has quit IRC | 13:58 | |
*** timte has joined #zope3-dev | 14:01 | |
*** timte has quit IRC | 14:02 | |
*** andrew_m has quit IRC | 14:15 | |
*** jodok_ has quit IRC | 14:24 | |
*** MJ|lunch is now known as MJ | 14:27 | |
*** MJ is now known as MJ|busy | 14:27 | |
*** Newfie2007 has joined #zope3-dev | 14:27 | |
*** andrew_m has joined #zope3-dev | 14:28 | |
*** norro has joined #zope3-dev | 14:31 | |
*** tonico has joined #zope3-dev | 14:34 | |
*** norro_ has joined #zope3-dev | 14:37 | |
norro_ | hi zopies. i want to do an internal linking inside my object hierarchy (BTreeContainers). | 14:39 |
norro_ | This linking has to be robust when updating the object hierarchy. I read something about an ObjectHub, but that seems to be just a proposal. | 14:39 |
norro_ | So what is the best way to do this? Any hints? | 14:39 |
norro_ | btw: "linking" means providing html-links inside the views | 14:40 |
*** b52laptop has joined #zope3-dev | 14:43 | |
*** huajie has quit IRC | 14:44 | |
norro_ | if my question doesn't make sense to you, please also tell me :) | 14:48 |
projekt01 | norro_, see z3c.resource this is a local resource implementation, you can store images in the object annotation. This means the links are always relative to the object. | 14:51 |
*** jodok has joined #zope3-dev | 14:52 | |
*** norro has quit IRC | 14:53 | |
*** rcrafton has joined #zope3-dev | 14:55 | |
projekt01 | rcrafton, moin | 14:56 |
*** sorindregan has quit IRC | 14:56 | |
ccomb | norro_: if the link in the view is generated with the absolute_url view, there is nothing to do | 14:57 |
ccomb | You justs have to make sure your objects are locatable | 14:57 |
*** norro__ has joined #zope3-dev | 14:58 | |
projekt01 | ccomb, you can't store objects in html | 14:58 |
ccomb | html ? | 14:58 |
norro__ | Sry, I had connection problems | 14:58 |
ccomb | (13:57:08) ccomb: norro_: if the link in the view is generated with the absolute_url view, there is nothing to do | 14:59 |
ccomb | (13:57:48) ccomb: You justs have to make sure your objects are locatable | 14:59 |
projekt01 | norro_, was asking for store html-links | 14:59 |
projekt01 | norro_, or not | 14:59 |
*** sorin has joined #zope3-dev | 14:59 | |
ccomb | I understand he just want to provide links to other objects in views | 14:59 |
*** sorin is now known as sorindregan | 14:59 | |
ccomb | maybe I'm wrong | 14:59 |
projekt01 | ccomb, Ah, yes, if so, then you are right. | 15:00 |
norro__ | ccomb yes | 15:00 |
norro__ | that's what i want to do | 15:00 |
norro__ | I want to provide HTML-Links inside a view to views of other objects. Those links must not break if the objects are moved | 15:02 |
projekt01 | Do you know your object which you like to generate links for. | 15:03 |
norro__ | yes | 15:03 |
projekt01 | then you can use url = absoluteURL(obj, request) + '/foo.html' | 15:03 |
norro__ | projekt01 hmmm, i think i have to answer 'no' to your previous question then | 15:06 |
projekt01 | which question? | 15:07 |
norro__ | 'obj' would have to be some kind of object refernce, i think. I don't know how to do this with zope3 | 15:07 |
norro__ | the question if i know the object | 15:07 |
projekt01 | How do you know which obj do you like to reference? | 15:08 |
projekt01 | How do you selecting the objects which should get linked? | 15:08 |
projekt01 | Are you asking for insert links in a WYSIWYG editor? | 15:09 |
norro__ | i know the object, when the user creates the link for the first time. But I don't know how to /track/ the object when it's moved | 15:09 |
norro__ | yes, inside an editor | 15:10 |
*** niemeyer has joined #zope3-dev | 15:10 | |
projekt01 | that's what I mean. It's impossible to do that. | 15:10 |
projekt01 | because you never know what's happen with the html and links inside. Ok, not impossible but very hard to track. | 15:11 |
*** norro_ has quit IRC | 15:11 | |
projekt01 | Why not store the objects in the annotation of the object and use relative links form html to the linked object? | 15:12 |
ccomb | the user enter the link himself? | 15:12 |
*** Aiste has joined #zope3-dev | 15:12 | |
projekt01 | I implemented a solution in z3c.resource. It offers you lokal resources including a proxy and a local ++resource++ namespace | 15:13 |
norro__ | ccomb the user selects the object, he wants to create a link to | 15:14 |
projekt01 | norro__, then copy the object to the local resource annotation and use relative links to the objcet, then you are fine. | 15:15 |
norro__ | would that be an actual _copy_ of the object? | 15:15 |
projekt01 | I recommend doing a real copy, because you never know if the original object get deleted. | 15:16 |
ccomb | When an object is moved, its intid is changed? | 15:17 |
projekt01 | I guess it's a conceptual question, but most the time image resources used in a html editor has it's own lifecycle. | 15:17 |
projekt01 | ccomb, moved no, copied yes. | 15:18 |
norro__ | projekt01 images are not the problem here. i want to link other documents | 15:18 |
norro__ | ccomb I never heard of intid. that' | 15:18 |
norro__ | that could be a solution | 15:19 |
*** jinty has quit IRC | 15:19 | |
*** gmat has left #zope3-dev | 15:20 | |
norro__ | ccomb so intid is a unique id inside the content tree? | 15:20 |
dennis_ | if you copy a persistent object to another container, aren't they still the same object, even if you delete it from one it persist in the other until it is completely unreferenced? | 15:20 |
dennis_ | i put attach my media (pics etc) to the content object, since that is where they belong, but it would be just as easy to also drop a "copy" into a global container with all media content | 15:22 |
dennis_ | (ok maybe I am mixing up deleteing it, and removing it from a container) | 15:22 |
ccomb | norro_: yes unique inside the whole instance if I remember | 15:23 |
ccomb | so you could provide a view @@intid?id=XX instead of the full path | 15:23 |
norro__ | ccomb. that seems to be what i need. thank you very much | 15:23 |
ccomb | or a traversal adapter ++intid++/id | 15:23 |
dennis_ | norro_ ccomb but the object needs to be in _some_ container for persistence and intids to work, which one will you use ? | 15:24 |
*** jfroche has joined #zope3-dev | 15:24 | |
ccomb | don't know how norro's app work | 15:25 |
*** jsadjohnson has joined #zope3-dev | 15:25 | |
dennis_ | :) | 15:25 |
projekt01 | never register views like @@intid?id=xx, this is a big security problem | 15:25 |
norro__ | dennis_ all my objects are container objects and arranged to a tree | 15:25 |
*** MJ|busy is now known as MJ|out | 15:25 | |
ccomb | projekt01: you're right, it's an instead idea, probably a bad idea | 15:26 |
ccomb | instead → instant | 15:26 |
dennis_ | project01 makes sense, but, isn't actual access to those objects restricted anyway? | 15:26 |
projekt01 | the ++intid++/id is a very bad concept at all if you need ot lookup from html. | 15:27 |
projekt01 | Not if the object/links should appear for public access | 15:27 |
ccomb | but the view @@intid?id=xx could return the real path instead of the object | 15:27 |
ccomb | that would not be a security problem then? | 15:28 |
projekt01 | even that allows you introspection, but that's probabaly not important for protecting. | 15:28 |
dennis_ | project01 sorry for asking more, but i would expect the objects to be protected by their permissions, and disabling intid?id would only be safer in the sense that you hide the objects more | 15:28 |
dennis_ | just curious about the security and how it works | 15:29 |
dennis_ | oops and i will spell you more with k instead of c ) | 15:29 |
projekt01 | If you allow to use ++intid++id, thismeasn you will allow to introspect objects by their ids. | 15:30 |
Cripps | and that's NOT a good thing ... | 15:30 |
Cripps | which is why making uuids for object names is totally fricken' AWESOME! ;) | 15:30 |
ccomb | what do you mean by « introspect objects by their ids » ? | 15:31 |
projekt01 | If a object exist, it tells you forbidden access, if a object doens't exist it tells you key error. This will give hacker hints where they can try once more | 15:31 |
Cripps | ccomb: introspect allows you to view all programmatic details of an object. | 15:31 |
philiKON_ | that's why both ForbiddenAttribute and KeyError are system errors | 15:31 |
philiKON_ | the user will only see "A System error occurred" | 15:31 |
dennis_ | projekt01 but why are intids then special then, they could also just try with names through the normal traversing | 15:31 |
Cripps | phil: I was wondering about that. | 15:31 |
ccomb | Cripps: I didn't understand the "by intid" part of introspection | 15:32 |
projekt01 | philiKON, yes, but not if somebody registers ++intid++id as a API | 15:32 |
philiKON_ | it all depends on how it's hooked up | 15:33 |
ccomb | If the intid view is protected by zope.Public, but the object itself is protected by another permission, the object can be viewed ? | 15:34 |
projekt01 | dennis_, like philiKON, says, we mask this different errors, there is no chance that a users will see the difference. | 15:34 |
philiKON_ | ccomb: no | 15:34 |
ccomb | so where is the security bb? | 15:34 |
ccomb | pb | 15:34 |
philiKON_ | pb? | 15:34 |
ccomb | issue | 15:34 |
*** philiKON_ is now known as philiKON | 15:34 | |
*** alga has joined #zope3-dev | 15:34 | |
philiKON | no idea | 15:34 |
projekt01 | ccomb, it's not forbidden to use ++intid++id as a lookup, it's just not that smart as it looks. | 15:35 |
philiKON | except that i wonder why somebody would want an ++intid++ traverser in the first place | 15:35 |
ccomb | this kind of view could be used for permalink, could'nt it? | 15:35 |
ccomb | or are there other way to do permalink? | 15:35 |
philiKON | an ugly permalink | 15:36 |
* philiKON wouldn't expose ++ urls to the outside | 15:36 | |
dennis_ | while partly on the topic : any apache rewriting rules to disable those from the outside ? (inside I use ++skin++ and ++vh++) | 15:37 |
* mgedmin is with philiKON on this one | 15:37 | |
projekt01 | ccomb, your question about security issue; hackers allways try to do things step by step, to find a working url is the first step. I don't say that this is a problem in general. | 15:37 |
norro__ | so philiKON mgedmin do you like the @@intid?id=xx idea more? | 15:37 |
mgedmin | no, I think URLs should be sensible | 15:38 |
ccomb | norro : not really, it seems :) | 15:38 |
philiKON | norro__: that's even worse | 15:38 |
mgedmin | /articles/about-this-thing.html, etc. | 15:38 |
philiKON | right | 15:38 |
philiKON | even drop the .html | 15:38 |
norro__ | ok, I see | 15:38 |
philiKON | first of all, why would the user care about the fact that it's an "intid" | 15:38 |
mgedmin | what are the objects you're linking to, and why do they move around? | 15:38 |
philiKON | and second, why expose numbers at all | 15:39 |
norro__ | mgedmin the objects are containers and they are moved to alter the structure of the tree | 15:39 |
philiKON | norro__: if you use the object filing system | 15:39 |
ccomb | is there a similar problem when using intid for vocabulary tokens ? | 15:40 |
philiKON | meaning, you arrange data in hierarchies using folders | 15:40 |
philiKON | ccomb: i don't see which problem is similar to this... ? | 15:40 |
ccomb | tokens are exposed | 15:40 |
philiKON | why is that a problem? | 15:41 |
ccomb | someone told this a few lines above | 15:41 |
philiKON | norro__: if you imagine a blog application, /blog/2006/02/03/1 would be a sensible URL *and* permalink, no matter how the data is structured hierarchically in folders | 15:41 |
philiKON | norro__: actually, that hierarchical structuring is mostly a CMS thing... | 15:42 |
philiKON | well, the need of wanting to move around things in hierarchies at least | 15:42 |
philiKON | ccomb: where? | 15:42 |
norro__ | philiKON, but if if I move the blog entry from container /blog/2006/02/03 to container /blog/2006/02/04, the previous created link '/blog/2006/02/03/1' would break, wouldn't it? | 15:44 |
philiKON | who says that 2005/02/03 is a folder? | 15:44 |
philiKON | and why would you move it? | 15:44 |
philiKON | you wrote that article once | 15:44 |
philiKON | on that date | 15:44 |
philiKON | you can't change history :) | 15:44 |
norro__ | :) | 15:45 |
ccomb | philiKON: nowhere, I'm beginning to mix up my ideas :) | 15:45 |
*** jpcw2002 has left #zope3-dev | 15:46 | |
norro__ | my app _is_ some kind of CMS. The objects I want to move are some kind of steps of an instruction sheet. If I want to rearrange those steps, I sometimes have to move them to another folder | 15:47 |
ccomb | /blog/2006/02/04 is a handled by a traversal adapter? | 15:48 |
ccomb | assuming that the ++ part is hidden by the rewriter ? | 15:48 |
philiKON | i don't see a ++ part | 15:49 |
dennis_ | ccomb dont need a new traverser, you could make "blog" a clever container, mgedmin wrote a great doc about that a while ago | 15:49 |
philiKON | but yeah, traversal adapter | 15:49 |
dennis_ | mgedmin is it still online? | 15:49 |
dennis_ | (i mean no new ++ namespace) | 15:49 |
mgedmin | if it ever was online, it still is | 15:49 |
* mgedmin googles | 15:49 | |
mgedmin | perhaps this is what philiKON referred to: http://mg.pov.lt/blog/zope3-custom-traversal.html | 15:50 |
philiKON | norro__: rearrangement is ok, you just need to decide whether you want your object hierarchy to be reflected in the URL hierarchy or not | 15:50 |
dennis_ | "Note that this is the regular view directive, not browser:view." ha! thanks for adding that! ran into that one at first :) | 15:51 |
norro__ | philiKON that seems to be the default behaviour of zope3 and I like the idea to use as much as possible the default way :) | 15:52 |
norro__ | stll trying to get deeper and deeper into the whole zope3 thing | 15:53 |
*** jpcw2002 has joined #zope3-dev | 15:53 | |
philiKON | norro__: buying my book would be a good start :) | 15:54 |
projekt01 | norro__, and don't start with the deepest things ;-) | 15:55 |
norro__ | philiKON i own both editions :) | 15:55 |
philiKON | good :) | 15:55 |
philiKON | you can use the 1st edition as firewood | 15:55 |
* ccomb would like to also have the 1st edition to start a collection :) | 15:56 | |
philiKON | spoiler: the main character dies in the 3rd book | 15:57 |
*** whit has joined #zope3-dev | 15:58 | |
jpcw2002 | ccomb: i can sell you mine, but i prefer wait price grow up :-) | 15:58 |
norro__ | philiKON while we're at it: when does the third edition enter the market? | 15:58 |
philiKON | let's see, i first have to start working on it, ... | 15:58 |
norro__ | I see :) | 15:58 |
*** BjornT_ has joined #zope3-dev | 15:59 | |
*** BjornT has quit IRC | 15:59 | |
norro__ | so guys, as a conclusion: thanks you guys for your manifold ideas. I will think about it | 16:01 |
*** J1m has joined #zope3-dev | 16:03 | |
*** BjornT has joined #zope3-dev | 16:04 | |
*** BjornT__ has joined #zope3-dev | 16:05 | |
*** BjornT_ has quit IRC | 16:06 | |
*** MrTopf has joined #zope3-dev | 16:06 | |
*** reco has joined #zope3-dev | 16:12 | |
*** whit has quit IRC | 16:15 | |
Cripps | philiKON: speaking of which, I've got a few more "revisions" for 3rd ed. I'll email them to you when I get the time. | 16:15 |
dennis_ | cripps, also feel free to make a nice site where you blog about zope 3 tips and tricks - i love those :) | 16:16 |
philiKON | Cripps: sure, would be appreciated | 16:17 |
Cripps | dennis_: hahaha. Yeah, maybe I should ... I've already got a hella awesome svn how-to page up. :P | 16:17 |
Cripps | dennis_: although, I'm not sure if it's available locally or to the whole world. | 16:17 |
dennis_ | lol you are not sure? | 16:18 |
dennis_ | dont blog about security, i will stick to the book for that :) | 16:18 |
ccomb | Someone has made an intersting site : http://kelpi.com | 16:18 |
Cripps | dennis_: nope, not sure. It's hosted at work, but I'm not sure which subnet it's on, I only know the hostname, not the IP, or if that port is allowed traffic on that subnet ... | 16:18 |
ccomb | it's made in zope3, and contains several tips for z3 | 16:19 |
dennis_ | thanks for the link ccomb! | 16:19 |
Cripps | dennis_: hahaha ... I'll let my friend Chris do the security blogging ;) | 16:19 |
pcardune | speaking of security... why does zope3 authentication have to be so painful (or am I missing something?) | 16:20 |
dennis_ | you are maybe missing something, it works quite nicely i think :) | 16:20 |
dennis_ | anything specific? | 16:20 |
ccomb | pcardune: because it's flexible and pluggable | 16:21 |
ccomb | but not so difficult | 16:21 |
pcardune | dennis_: I'm just trying to figure out the simplest way to set up user management in an application | 16:21 |
pcardune | you know... the standard stuff, login, logout, adding and removing users | 16:22 |
dennis_ | do you want to allow self-signup ? | 16:22 |
pcardune | no | 16:22 |
dennis_ | off the top of my head, add a pluggable authentication manager to your site manager, enable the (for example) sessions-credentials plugins and principal folder, and then you can add and modify users through the zmi | 16:23 |
pcardune | I *think* I have my authentication plugin setup right and my credentials plugin setup right, but alas, login/logout does not work fo rme | 16:23 |
pcardune | I think it has something to do with the login/logout views | 16:24 |
dennis_ | register the PAU | 16:24 |
pcardune | which I have yet to figure out how to use | 16:24 |
dennis_ | and dont forget to assign roles or permissions to your new principals | 16:24 |
*** whit has joined #zope3-dev | 16:26 | |
ccomb | pcardune: I've recently added add a few lines on this in the FAQ, but I guess you're a step beyond? | 16:26 |
lisppaste6 | pcardune pasted "constructor for site with authentication stuff" at http://paste.lisp.org/display/42820 | 16:26 |
pcardune | I just pasted what I think I've got right | 16:27 |
pcardune | ccomb: which FAQ? | 16:27 |
ccomb | http://wiki.zope.org/zope3/FAQ | 16:27 |
ccomb | 4.4 | 16:27 |
ccomb | after that you should be able to create users and login. | 16:28 |
ccomb | But not logout | 16:28 |
*** alecm has joined #zope3-dev | 16:28 | |
ccomb | logout is in 1.58 | 16:28 |
pcardune | ccomb: ok, i'm checking those out right now | 16:28 |
*** reco has quit IRC | 16:29 | |
Cripps | I have a general uuid generator that adapts IContainer, and provides INameChooser ... how would I use this? the adapter is it's *own* package, and I want to use it from all my containers within my main project ... | 16:29 |
Cripps | it *should* be as easy as "NameChooser = getAdapter(INameChooser,'adapterName')" ... I think. | 16:30 |
philiKON | nope | 16:30 |
philiKON | INameChooser(the_container) | 16:30 |
dennis_ | just do INameChooser( MyContainer ) | 16:30 |
pcardune | took the words out of my mouth | 16:30 |
philiKON | name choosers aren't named adapters | 16:31 |
philiKON | and adapters always need the object that they're adapting as an argument | 16:31 |
Cripps | philiKON: so I should just have it registered as an adaptor, and not a *named* adapter? | 16:31 |
philiKON | right | 16:31 |
philiKON | see my book | 16:31 |
Cripps | kk. That makes sense. Which chapter? | 16:31 |
*** baijum has quit IRC | 16:31 | |
Cripps | 15? | 16:31 |
philiKON | the one about containers | 16:31 |
philiKON | also, it has an index :) | 16:31 |
Cripps | heh, yep ... 15. That was off the top of my head ;) | 16:32 |
dennis_ | every time i read some section again i notice something new i was wondering about | 16:32 |
pcardune | philiKON: I left my copy at home, any chance you could send me an electronic version of the chapter on security ;) | 16:32 |
philiKON | i'm afraid i can't | 16:33 |
ccomb | pcardune: you can download the example code from the site | 16:34 |
*** MrTopf has quit IRC | 16:34 | |
ccomb | http://worldcookery.com/files/examples-2.0.1.tgz | 16:34 |
pcardune | ccomb: that is a very useful piece of information | 16:34 |
ccomb | grep RecipeNameChooser | 16:35 |
*** MJ|out is now known as MJ|busy | 16:36 | |
*** zez_zez has joined #zope3-dev | 16:38 | |
*** stub has quit IRC | 16:49 | |
*** niemeyer has quit IRC | 16:51 | |
*** kobold has joined #zope3-dev | 16:53 | |
*** niemeyer has joined #zope3-dev | 16:54 | |
*** whit has quit IRC | 16:55 | |
*** schwendinger_ has joined #zope3-dev | 16:57 | |
*** philiKON has quit IRC | 16:58 | |
*** philiKON has joined #zope3-dev | 17:00 | |
*** jfroche has quit IRC | 17:00 | |
*** jfroche has joined #zope3-dev | 17:03 | |
*** sorindregan has quit IRC | 17:06 | |
*** yvl has quit IRC | 17:10 | |
*** schwendinger has quit IRC | 17:14 | |
Cripps | philiKON: yeah, after I removed the 'name' section in the adapter registration, and *over-rided* the __init__ and __setitem__ methods for my container, everything worked as expected ... now I just have to fix up the doctests ;) | 17:24 |
*** febb has quit IRC | 17:24 | |
philiKON | why would you want to override __init__ and __setitem__? | 17:24 |
Cripps | philiKON: to set self.nameChooser | 17:26 |
Cripps | and setitem to call it. | 17:26 |
philiKON | ugh | 17:26 |
*** zagy has quit IRC | 17:27 | |
philiKON | why? | 17:27 |
mgedmin | wha...? | 17:27 |
* Cripps goes back to the book. | 17:28 | |
mgedmin | you use the names chooser externally | 17:28 |
mgedmin | when you want to add an item to a container, you do the name chooser dance: | 17:28 |
mgedmin | chooser = INameChooser(container) | 17:28 |
mgedmin | name = chooser.chooseName(suggested_name, item) | 17:29 |
mgedmin | container[name] = item | 17:29 |
mgedmin | yesterday I wondered if zope.app.container ought to have a helper for this | 17:29 |
philiKON | it should | 17:29 |
mgedmin | something like zope.app.container.add(container[, suggested_name]) | 17:29 |
philiKON | addToContainer(container, obj, suggested_name=None) | 17:29 |
philiKON | or something like that | 17:30 |
philiKON | mgedmin: you need obj :) | 17:30 |
mgedmin | duh :) | 17:30 |
philiKON | btw, i also think that name choosers should really be multi-adapters for (container, obj) | 17:30 |
* mgedmin was probably thinking about container.add(obj, suggested_name=None) | 17:30 | |
mgedmin | which is hard to do without breaking everyone's custom container implementations | 17:31 |
philiKON | yeh | 17:31 |
*** whit_ has joined #zope3-dev | 17:31 | |
*** jkakar has quit IRC | 17:35 | |
dennis_ | Is there a way to speed up the IUndoInterface.getTransaction( context = MyObj ) so that it is usable? It would be fantastic to be able to show undo information per contect object | 17:43 |
Cripps | heh ... I'm a moron ... since my custom name chooser adapts IContainer, it "overrides" the default one ... I don't have to worry about a bleeding thing ... zope takes care of everything! | 17:44 |
*** whit has joined #zope3-dev | 17:49 | |
*** ignas has quit IRC | 17:49 | |
*** whit_ has quit IRC | 17:49 | |
dennis_ | or alternatively, can I query the current transaction ID such that I may store it with the annotations of an object when modifying, such that I can use one later to undo something? | 17:50 |
*** tarek is now known as cecilia | 17:56 | |
philiKON | dennis_: stay away from zodb undo if you want to imitate versioning | 17:59 |
philiKON | that's my advice | 17:59 |
dennis_ | i don't really need versioning (would be wonderful if it were available at little cost of course), but just to prepare for the inevitable editor who says "oops i accidentally clicked yes on both alert boxes without reading and deleted half the site" kind of thing | 18:01 |
philiKON | that's what "Undo!" is for: undoing your last transaction | 18:01 |
philiKON | but again, it might not be such a good idea to expose it to content editors | 18:01 |
dennis_ | every editor his own last few undos? of course any idea is welcome, you can imagine how people will use it in practice :) | 18:04 |
*** cecilia is now known as tarek | 18:05 | |
*** jkakar has joined #zope3-dev | 18:09 | |
*** schwendinger_ has quit IRC | 18:11 | |
*** jinty has joined #zope3-dev | 18:16 | |
Theuni | dennis_: the problem is that database level undo is very far away from the application and editors. | 18:17 |
Theuni | database undo might even prohibit any undo although an editor might expect it to work. | 18:17 |
*** schwendinger has joined #zope3-dev | 18:17 | |
Theuni | database level undo depends so much on what the application does with your data ... | 18:18 |
Theuni | typically you don't want to revert transactions but do something a bit more high-level | 18:18 |
Theuni | one example would be to take snapshots in your application, e.g. using zc.copy and zc.freeze | 18:19 |
Theuni | then you could keep old copies around whenever you like. | 18:19 |
*** norro__ has quit IRC | 18:20 | |
*** b52Centos has quit IRC | 18:20 | |
dennis_ | checking them out, thanks theuni | 18:20 |
*** b52Centos has joined #zope3-dev | 18:20 | |
mgedmin | there's an entire version control system build on top of them: zc.vault | 18:21 |
mgedmin | although using it is kind of tricky | 18:22 |
dennis_ | thats a bit overkill perhaps for now for my purpose | 18:25 |
dennis_ | :) | 18:25 |
CSWookie | I should learn more of the vault. | 18:25 |
CSWookie | Is there a hook someplace in the adapter registry where I can add my own little sub-registry? So if something didn't get found it would then look in my thing? | 18:28 |
mgedmin | probably | 18:30 |
mgedmin | isn't that how local adapters work? | 18:30 |
mgedmin | you have a bunch of sites, and each has its own adapter registry, and each delegates failed lookups upwards | 18:30 |
Cripps | mgedmin: doesn't zope look up local adapters first, and then check for framework level adapters? | 18:31 |
mgedmin | I don't know what "framework level adapters" are | 18:31 |
Cripps | mgedmin: all the generic ones that come with zope (for example: NameChooser) | 18:31 |
mgedmin | ah, the global ones? yes | 18:32 |
CSWookie | mgedmin: Yeah, but I want this without making sites. | 18:32 |
mgedmin | CSWookie: I'm not intimately familiar with zope.component | 18:32 |
CSWookie | OK. thanks. | 18:32 |
mgedmin | I have a feeling that you can have your own independent component registries | 18:32 |
mgedmin | I'd go and read some txt files | 18:32 |
*** malthe has quit IRC | 18:33 | |
dennis_ | my undo was inspired by: http://griddlenoise.blogspot.com/2006/02/gut-feel-comparison-of-code-between.html , though it seems he limited to delete only, which would be fine for me too | 18:36 |
*** MJ|busy has quit IRC | 18:36 | |
*** pbugni has joined #zope3-dev | 18:38 | |
*** jodok has quit IRC | 18:42 | |
* mgedmin puts on a brown paper bag | 18:46 | |
* Cripps draws a sad face on mgedmin 's paper bag | 18:49 | |
* dennis_ puts on his robe and wizard hat | 18:50 | |
Cripps | dennis_: I thought I told you never to message me again you fucker. | 18:51 |
Cripps | ;) | 18:51 |
dennis_ | ah crap | 18:51 |
Cripps | ahhh ... bash.org | 18:51 |
dennis_ | you should send me a list of your nicks! | 18:51 |
*** rcrafton_ has joined #zope3-dev | 18:51 | |
*** jkakar_ has joined #zope3-dev | 18:52 | |
Cripps | Imma totally have to show this to xbeanx .. he'll shit himself :P | 18:52 |
*** jkakar_ has quit IRC | 18:54 | |
*** jkakar_ has joined #zope3-dev | 18:54 | |
*** projekt01 has left #zope3-dev | 18:54 | |
*** rcrafton has quit IRC | 18:58 | |
mgedmin | hm, a reliable zodb-level undo would be nice | 19:02 |
mgedmin | I think I tried to use the unto facility in zmi once, got some exception, and wrote it off as not working | 19:02 |
*** sm has left #zope3-dev | 19:02 | |
*** jfroche has quit IRC | 19:03 | |
J1m | Undo is sometimes very useful. | 19:03 |
J1m | Note that undo, like conflict resolution, violates consistency. | 19:04 |
J1m | The history facility would also be very nice. | 19:04 |
J1m | It would be nice if every persistent object had a view that displayed a history summary. | 19:04 |
mgedmin | oh yes | 19:05 |
mgedmin | currently I use the debugzope console with a hacked script for that | 19:06 |
*** alecm has quit IRC | 19:06 | |
*** jkakar has quit IRC | 19:06 | |
*** alecm has joined #zope3-dev | 19:06 | |
*** norro has joined #zope3-dev | 19:08 | |
*** tarek has quit IRC | 19:09 | |
*** MacBank has joined #zope3-dev | 19:12 | |
*** MacBank is now known as MacYET | 19:12 | |
*** BjornT_ has joined #zope3-dev | 19:44 | |
*** BjornT has quit IRC | 19:46 | |
*** harobed has quit IRC | 19:50 | |
*** sm has joined #zope3-dev | 19:53 | |
*** schwendinger has quit IRC | 20:02 | |
*** kobold has left #zope3-dev | 20:10 | |
*** tonico has quit IRC | 20:10 | |
*** zez_zez has quit IRC | 20:14 | |
*** MacYET has left #zope3-dev | 20:14 | |
ccomb | Each time I try to play with adapters and annotations, I have permissions problems | 20:26 |
ccomb | I have an adapter called Thumbnail, which adapts from IImage to IThumbnail and write a generated thumbnail into the annotations of the Image | 20:26 |
ccomb | Does Thumbnail have to be trusted ? | 20:27 |
philiKON | trusted adapters | 20:27 |
philiKON | it's in my book | 20:27 |
* pbugni sees a shameless plug :) | 20:28 | |
pbugni | hi philipp | 20:28 |
philiKON | hi paul | 20:28 |
Cripps | hahaha ... nothing wrong with shameless plugs when they are for *the* definitive guide that's out there :P | 20:29 |
pbugni | indeed - get the book! | 20:29 |
*** pcardune_ has joined #zope3-dev | 20:30 | |
ccomb | philiKON: thanks I was not sure. I've another problem somewhere else | 20:30 |
Cripps | hahaha. I've already got it ... work bought it for me to use ;) | 20:30 |
Cripps | it's all nicely tabbed out and everything too (I love post-it tabs) | 20:31 |
*** pcardune has quit IRC | 20:31 | |
*** rcrafton has joined #zope3-dev | 20:40 | |
*** oferw has joined #zope3-dev | 20:43 | |
*** rcrafton has quit IRC | 20:49 | |
*** jukart has quit IRC | 20:54 | |
*** rcrafton_ has quit IRC | 20:57 | |
*** mgedmin has quit IRC | 20:59 | |
*** thruflo has joined #zope3-dev | 21:00 | |
thruflo | hey, is it ok to post a newbie qu. here? | 21:01 |
Cripps | thruflo: only if you ask the question instead of asking if you can ask a question. | 21:02 |
thruflo | :) trying to be polite | 21:02 |
Cripps | well, that kind of polite is usually frowned upon ;) | 21:02 |
thruflo | i'm getting a ComponentLookupError: (<InterfaceClass zope.app.intid.interfaces.IIntIds>, '') | 21:03 |
*** oferw has quit IRC | 21:03 | |
thruflo | whilst trying to get a livepage upload demo to work from http://svn.zope.org/zope3org/trunk/src/zorg/live/ | 21:03 |
*** oferw has joined #zope3-dev | 21:03 | |
thruflo | the line causing is intIds = zope.component.getUtility(IIntIds) | 21:04 |
*** rcrafton has joined #zope3-dev | 21:04 | |
thruflo | in the doc string of the LivePage class i read: | 21:04 |
thruflo | A livepage is registered for a location. The location is represented | 21:04 |
thruflo | by an id. It's up to the implementation to provide an id with the | 21:04 |
thruflo | getLocationId method that can be resolved by the getLocationResolver method. | 21:04 |
thruflo | 21:04 | |
thruflo | so presumably I need to register the utility with zope.component? | 21:05 |
thruflo | i've tried creating a Unique ID Utility via the ZMI and I've registered it as something abitrary but that doesn't help | 21:05 |
Cripps | thruflo: well, you will have to register the utility in your configure.zcml ... you'll probably want to specify a utility name as well. | 21:06 |
Cripps | although, if you're looking for an ID, you'll probably want to use NameChooser instead. | 21:06 |
Cripps | ...that works as an adapter. | 21:07 |
* thruflo nods - I've read about NameChooser | 21:07 | |
Cripps | in phil's book? ;) | 21:07 |
thruflo | ok, so i need a <utility provides="foo" /> | 21:07 |
thruflo | ^ yup :) | 21:07 |
thruflo | my newbie bible... | 21:07 |
*** rcrafton has quit IRC | 21:08 | |
Cripps | hahaha. Yeah ... It took me a few times reading through it before stuff started falling into place. | 21:08 |
thruflo | unfortunately just leant it to one of my colleagues for the w/e so don't have as reference atm :| | 21:08 |
thruflo | tx for the advice... | 21:09 |
Cripps | if you're using a utility, you'll want to specify a factory/component, and a name | 21:09 |
Cripps | so: <utility component="myIntID" name="foo.bar" /> | 21:09 |
Cripps | or: <utility factory="module.IntIdFactory" name="my.foo" /> | 21:10 |
thruflo | ok - is there is a standard unique id utility handy? | 21:10 |
Cripps | where module is the name of a file, and IntIdFactory is a factory class, or method, that creates an int ID for you | 21:10 |
* thruflo nods again | 21:11 | |
Cripps | thruflo: well, there is a global unique id utility ... it will basically allow you to specify a name, and double check the container to ensure that it's not a double. | 21:11 |
Cripps | er, rather, it's an adapter ... and it works transparently. | 21:11 |
thruflo | got you on the terminology ;) | 21:12 |
Cripps | Personally, I wrote my own NameChooser that generates unicode UUIDs for each object created in a container. | 21:12 |
thruflo | yup - will presumably want to do that when implementing for real, for now I'd like to see if I can get this livepage setup to work as a proof of concept | 21:13 |
Cripps | actually, making your own is fairly straightforward. | 21:14 |
thruflo | ok | 21:14 |
Cripps | mine is a total of 100 lines of code (max), doctests, registration, and all. | 21:14 |
* thruflo googles | 21:16 | |
dennis_ | thruflo you have added a Unique Integer Utility to the site manager of your site, and registered it for interface <InterfaceClass zope.app.intid.interfaces.IIntIds> ? | 21:20 |
thruflo | maybe not for the Interface | 21:21 |
dennis_ | try that :) | 21:22 |
thruflo | yes, that's the 'provided interface' in the drop down | 21:22 |
dennis_ | yes | 21:22 |
dennis_ | can you run zopectl, and then 'debug' | 21:23 |
*** MJ has joined #zope3-dev | 21:24 | |
thruflo | done, have >>> | 21:24 |
*** MJ has quit IRC | 21:24 | |
dennis_ | from zope.component import getUtility | 21:24 |
* thruflo nods | 21:25 | |
dennis_ | from from zope.app.intid.interfaces import IIntIds | 21:25 |
dennis_ | id = getUtility( IIntIds ) | 21:25 |
thruflo | zope.component.interfaces.ComponentLookupError: (<InterfaceClass zope.app.intid.interfaces.IIntIds>, '') | 21:26 |
thruflo | something's wrong ;) | 21:27 |
dennis_ | for i in root.getSiteManager(): print i | 21:27 |
dennis_ | and for i in root.getSiteManager()['default']: print i | 21:27 |
thruflo | default | 21:27 |
philiKON | thruflo: simple: you need to create and register an intid utility | 21:27 |
thruflo | CookieClientIdManager, PersistentSessionDataContainer, PrincipalAnnotation, RootErrorReportingUtility, img | 21:28 |
philiKON | dennis_: the *contents* of a site manager container and the *registered* components are two absolutely unrelated sets | 21:28 |
dennis_ | so thruflo where exactly did you add your utility ? | 21:28 |
dennis_ | philiKON sure but he just said he added it to the site manager, so it should be there | 21:28 |
philiKON | ah | 21:28 |
philiKON | perhaps to the wrong one | 21:29 |
thruflo | erm, perhaps i didn't add it to the site manager | 21:29 |
philiKON | doesn't matter | 21:29 |
philiKON | what matter is: | 21:29 |
philiKON | did you register it? | 21:29 |
thruflo | i may not *have* a site manager :p | 21:29 |
philiKON | just adding it isn't enough | 21:29 |
dennis_ | philiKON browse up 10-15 lines | 21:29 |
dennis_ | i started with that too | 21:29 |
thruflo | open localhost/@@contents.html -> click add Unique ID Utility | 21:29 |
thruflo | voila | 21:29 |
philiKON | dennis_: heh, shoulda read the backlog :) | 21:30 |
thruflo | so I should have a site manager; then I register a uid utility, whether via the ZMI, or by making my own... | 21:31 |
philiKON | after reading the backlog, it's not really obvious if thruflo has actually registered the utility | 21:31 |
dennis_ | you should hope I can debug this since I learnt it from your book :) | 21:31 |
dennis_ | i would say not because the debug getUtility fails | 21:31 |
*** WebMaven has joined #zope3-dev | 21:31 | |
philiKON | in zopectl dbug the getUtility lookup will always fail | 21:31 |
philiKON | because it deosn't know about local sites yet | 21:31 |
philiKON | let's forget zopectl debug for a moment | 21:32 |
philiKON | thruflo's last statement confuses me | 21:32 |
thruflo | ah, philiKON may i say thank you very much for your book - digesting it as fast and as often as I can :) | 21:32 |
dennis_ | ah really? | 21:32 |
philiKON | so | 21:32 |
philiKON | to be absolutely crystal clear | 21:32 |
philiKON | you add a utility | 21:32 |
philiKON | you always have to do that | 21:32 |
philiKON | and then you have to register it | 21:32 |
philiKON | those are two separate steps | 21:32 |
philiKON | involving the same object | 21:32 |
philiKON | it's not an "either ... or" | 21:33 |
philiKON | and registering the thing actually involves going to the "Registration" tab and clicking the "register" button | 21:33 |
thruflo | i did do both steps | 21:34 |
thruflo | add and then register | 21:34 |
*** tarek has joined #zope3-dev | 21:36 | |
*** zagy has joined #zope3-dev | 21:37 | |
philiKON | ok | 21:38 |
*** andrew_m has quit IRC | 21:38 | |
*** richardkan has quit IRC | 21:43 | |
thruflo | tx * for the help, will return to this on monday ;) | 21:46 |
*** thruflo has quit IRC | 21:47 | |
*** ktwilight_ has joined #zope3-dev | 21:57 | |
*** rcrafton has joined #zope3-dev | 22:00 | |
*** Newfie2007 has quit IRC | 22:01 | |
*** zagy has quit IRC | 22:04 | |
*** yota has quit IRC | 22:09 | |
*** yota has joined #zope3-dev | 22:11 | |
*** ktwilight has quit IRC | 22:12 | |
*** rocky is now known as rocky|away | 22:19 | |
*** tarek has quit IRC | 22:32 | |
*** andrew_m has joined #zope3-dev | 22:36 | |
*** pcardune_ has quit IRC | 22:38 | |
*** zagy has joined #zope3-dev | 22:43 | |
*** zagy has quit IRC | 22:44 | |
*** zagy has joined #zope3-dev | 22:51 | |
*** whit has quit IRC | 22:52 | |
*** whit has joined #zope3-dev | 22:52 | |
*** whit has quit IRC | 22:55 | |
*** whit has joined #zope3-dev | 22:55 | |
*** zagy has quit IRC | 22:55 | |
*** d2m has quit IRC | 23:02 | |
*** bigkevmcd has quit IRC | 23:20 | |
*** jinty has quit IRC | 23:26 | |
*** harobed has joined #zope3-dev | 23:33 | |
*** WebMaven has quit IRC | 23:47 |
Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!