IRC log of #zope3-dev for Sunday, 2005-09-11

*** mgedmin has joined #zope3-dev00:06
*** Aiste has quit IRC00:48
*** roym has joined #zope3-dev01:10
roymfolks, I am using my own own zpt template w/the <editform> tag; I find that any changes I make in the edit view don't take effect. Is there anything I need to specify additionally when I override the default edit view?01:15
*** Alef has joined #zope3-dev01:28
*** SureshZ has quit IRC01:55
*** roym has quit IRC01:57
*** mgedmin has quit IRC02:49
*** Alef has quit IRC02:52
*** peaceman_ has joined #zope3-dev03:33
*** peaceman has quit IRC03:34
*** yota has quit IRC03:38
*** sashav has quit IRC06:12
*** sashav has joined #zope3-dev07:22
*** Volpe has joined #zope3-dev08:46
VolpeIs there anything similiar to a virtual host monster for zope 3 (i.e. something that has a user interface) - Or is overwriting the HTTPRequestPublisherFactory the only way? :\08:48
*** Volpe has quit IRC09:46
*** sashav has joined #zope3-dev11:05
*** timte has joined #zope3-dev12:09
*** jhauser has quit IRC12:18
*** M1 is now known as mj12:21
*** mj is now known as MJ12:23
*** d2m has quit IRC12:24
*** jenner has joined #zope3-dev12:32
*** timte has quit IRC12:41
*** yota has joined #zope3-dev12:50
*** d2m has joined #zope3-dev12:52
*** projekt01 has joined #zope3-dev12:57
*** vlado has joined #zope3-dev13:24
*** J1m has joined #zope3-dev13:47
*** sashav has quit IRC14:02
bob2where is the magic of __dict__ explained?14:30
bob2my broswer:form declartion fails because the class it's submitting to doesn't have 'update' in __dict__, tho it is a valid attribute on the class itself14:31
bob2(this is using formlib again)14:32
J1mwhy are you using browser:form with formlib?14:35
jennerUhm... app/ seems to do something strange: I get an error "No module named ssageboard.tests" when running with --dir=/var/lib/zope3/instance/first/src/book/messageboard, notice the truncated module name it complains about14:38
bob2hrm, how should I be using formlib? browser:editpage?14:39
J1mformlib is used to create forms in *python*.14:40
J1mYou then register them with the adapter directive.14:40
J1mbrowser:form and browser:editform are used to define forms in zcml.14:40
J1mWe eventually realized that Python is a better construction language than zcml. :)14:41
J1mjenner, try using a relative path.14:41
bob2ooh. formlib works by doing adapter lookups on the object, using the view name as the name to lookup?14:42
J1mjenner, we will soon be replacing the existing test runner with a new one. The new one has a similar UI but is more robust.14:42
J1mbob2, no14:42
jennerNow I'm getting "ValueError: Empty module name" (app/testing/, I wonder if I need to provide an additional PYTHONPATH14:44
J1mwhat are you trying to do?14:44
jennerJ1m: I'm trying to follow the example at
J1mCould you be a bit more specific?14:46
J1mAre you trying to test something?14:46
jennerJ1m: the task is a bit harder then described in the page above since I'm doing it with debian's zope3 package (from experimental)14:46
jennerJ1m: yes, just run a unit test14:46
J1mTo run all of the tests:14:47
jennerThere's a "test" (executable py script)in my $INSTANCE/bin14:47
J1mpython test.py14:47
J1mto run the tests in a particular directory in src:14:47
J1msay, zope/app/container:14:47
J1mpython --dir zope/app/container14:47
jennerwhich "" are we talking about? the one from $ZOPE3_HOME/app/testing/?14:48
J1mhm, I summed you were using a checkout.14:49
J1mAre you working in an instance?14:49
J1mso, you have some package in lib/python?14:49
jenner(running 3.1.0c2)14:50
jennerright, in /usr/lib/python2.4/site-packages14:50
jenneroh, sorry, you mean the instance14:50
wiggyhm, wet footsteps in philiKON's book14:50
jenneryes, there's lib/python14:50
jennerwiggy: you bought it?14:51
J1mwhere is the package you want to test?14:51
wiggya while ago, yes14:51
wiggyand my cat just decided to walk over it after stepping through some water14:51
jennerJ1m: I created a $INSTANCE/src (as suggested in the tutorial) and added a book/ and a book/messageboard/ (I can import book.messageboard in python2.4 from the $INSTANCE/src directory)14:52
J1mThe tutorial is based on a checkout.14:52
jennerright, but the basics are the same, are they?14:52
J1m(Dang, I really need to update the tutorial to be based on instances.14:53
J1mThe directory layout is different.14:53
wiggyit would be nice if the README in the checkout explained how to make an instance as well14:53
J1mIn an instance, the lib/python directory plays the same role as src.14:53
jennerfor instance, bin/pyskel worked quite well, I just had to call it as `PYTHONPATH=src/ bin/pyskel <args>`14:53
jennerah, thanks14:53
J1mso, if your package is named foo and is in lib/python, then, from an instance, use:14:54
J1mbin/test --dir foo14:54
bob2hm, is there any example code that uses formlib in a real application?14:55
wiggyif I have a content type which is a container but also has some other data14:55
wiggywhat is the best way to browse through it from the ZMI?14:55
wiggyobject/@@contents.html doesn't seem to work14:56
J1mbob2. I don't know if there are any public examples.  I think Martijn just released some software that uses it though.14:57
jennerJ1m: ok, I moved the stuff from $INSTANCE/src to $INSTANCE/lib/python, the error is still the same (ValueError: Empty module name) -
J1mwiggy, depends on your content type.  You won't get contents.html unless you register a view that provides it.14:58
J1mjenner, don't inlcude lib/python in the --dir argument.14:59
J1mbin/test -vpu --dir book/messageboard14:59
J1malso, just try:14:59
J1mbin/test -vpu15:00
jennerJ1m: yay, now it's working, thanks (although I get a bunch of errors, like AttributeError: MessageBoard instance has no attribute 'values')15:00
jennerJ1m: muchos gracias15:00
wiggyJ1m: hm, is there a default view I can use?15:01
wiggyI can only find views for workflows and sitemanagement15:01
J1muse the api doc to read about the browser:containerViews zcml directive.15:02
jennerHm, I guess the IContainer interface changed since the tutorial was written15:02
J1mjenner, I don't think so15:03
*** timte has joined #zope3-dev15:04
jennerJ1m: so those 12 errors and one failure ( can be ignored?15:04
J1mTest errors generally may not be ignored.15:05
jennerThen either the tutorial is outdated or the test suite for IContainer has changed :)15:06
J1mYou aren't testing container15:06
J1mYou are testing your message board code.15:06
jennerYes, and it implements IContainer. According to the tutorial a basic test suite is provided by, which is what I'm calling in my test_messageboard.py15:08
J1mWhat tutorial are you refering to?15:08
J1mAh, that isn't the tutoroal15:09
J1mAh, that isn't the tutorial15:09
J1mThat's the zope book.15:09
J1mThat's the zope 3 book.15:09
J1mI'm sure that test is fine.15:09
J1mYour message board implementation is broken.15:09
jennerHmpf, sorry, you're right of course... forgot to inherit from BTreeContainer, that's why the test couldn't find the appropriate methods15:14
wiggyah, got the container view working15:24
jennershouldn't a content type have like "implements(... IAttributeAnnotatable ...)" in its implementation if it has an <implements interface="" /> in its configure.zcml?15:41
wiggyno, it's one or the other15:42
wiggythey are two ways to add marker interfaces15:43
wiggydecorations would be a nice 3rd, not sure if that's possible now15:44
J1myes, for functions15:44
J1mdecorators don't work for classes in python15:44
wiggyah, right15:44
wiggythat still annoys me15:44
jennerzope.configuration.config.ConfigurationConflictError: Conflicting configuration actions15:45
J1mYou have to directives trying to configure the same thing15:47
J1mactually, trying to provide the same component15:48
*** J1m has left #zope3-dev15:48
jennerthe error referes line 35.2-54.2 in both cases15:49
jennergot it - the book suggested to add a __setitem__ method for IMessage, however Message implements both, IMessage and IMessageContainer and the latter has also a __setitem__ declared...15:51
*** Aiste has joined #zope3-dev16:03
*** roym has joined #zope3-dev16:09
roymWhen I use a template="" directive in an <editform> stanza, is it16:12
roymalways necessary to use the class="" parameter as well?16:12
roymI am trying to figure out which method gets invoked in the action class (whatever that is?)16:16
bob2hm, I trawled the whole codespeak z3 svn repository16:16
bob2and nothing seemed to use formlib16:17
*** ksmith has joined #zope3-dev16:37
*** ksmith has left #zope3-dev16:37
roymnever mind - I found that I had omitted to call view/update in my custom zpt. Alls well now.17:16
roym... and that all the magic is happening in!17:19
*** jenner has quit IRC17:21
*** lunatik has joined #zope3-dev17:59
*** lunatik has left #zope3-dev17:59
roymhi, does anyone know if using sql: expressions in zpt pages18:13
roym       (w/sql_conn) is meant to be multi-threaded - or will requests be queued.18:13
srichterroym: what do you mean by multi-threaded?18:17
srichterall the sql: expression does is to create a query (pretty much like SQLMethod) and pass it to the sql_conn18:18
srichterso the semantics are the same18:19
roymsrichter: if I have multiple requests executing long-running queries, are they queued or do they run in parallel (agreed - this has more to do with SQLMethod than the "sql:" tag).18:28
roymjust wondering if you knew18:30
wiggyI have an content type that is attribute annotable18:30
wiggybut if I try to get to its annotations I get a nasty exception saying ForbiddenAttribute: ('__annotations__',..)18:30
wiggywhat might that be?18:30
*** mgedmin has joined #zope3-dev18:56
*** vlado has quit IRC18:57
*** lunatik has joined #zope3-dev19:05
projekt01argh, the PAU together with local Roles and groups is still not working, I have a local role which has a permission and the principal is in a group, this group is granted to the role on a object.19:07
projekt01that's not working if I login as a principal which has the group19:08
projekt01I really love this location less part at z3 ;-(19:10
projekt01srichter, I'm sure that the site hook isn't doing the job well if a utility calls another utilities without a context!19:12
*** vlado has joined #zope3-dev19:22
*** tiredbones has joined #zope3-dev19:34
*** sashav has joined #zope3-dev19:46
*** philiKON has joined #zope3-dev19:47
*** vlado has quit IRC19:50
*** peaceman has joined #zope3-dev19:52
*** peaceman_ has quit IRC19:56
*** sm has joined #zope3-dev20:25
smhi all20:26
smI think this would be a good place to find martijn faassen ?20:26
philiKONsm, yes, on week days20:27
philiKONsm, this channel, or #z3-base or #silva20:27
smz3 seems to be rocking along, as ever20:29
*** lunatik has left #zope3-dev20:30
srichterroym: they are executed immediately; no quing, because you expect the answer to be available for rendering the template. If a query takes a long time, then you are responsible of implementing a caching mechanism21:06
srichterwiggy: you need to make the adapter that uses the annotation a trusted adapter21:06
srichterso that the context, i.e. the object, is not security proxied21:07
srichterprojekt01: it would be good if you could isolate the problem and write a test demonstrating it.21:08
wiggysrichter: how do I do that?22:00
srichter in your ZCML directive say: trusted="True"22:06
*** timte has quit IRC22:10
*** tvon has quit IRC22:18
*** timte has joined #zope3-dev22:33
*** tvon has joined #zope3-dev22:37
wiggyForbiddenAttribute: ('chooseName'22:38
wiggydifferent error but still no go :)22:38
*** horizon5 has joined #zope3-dev22:45
*** timte has quit IRC23:16
*** ksmith has joined #zope3-dev23:38
*** Aiste has quit IRC23:43
projekt01srichter, I think the problem are non traversable objects where get checked via the canWrite or canAccess method23:45
projekt01srichter, is it not possible to provide security for non traversable objects where provide correct parents?23:46
projekt01srichter, I mean must a object be contained in a traversable structure or should security checks also work for objects where the parent is set with "locate()"23:49

Generated by 2.15.1 by Marius Gedminas - find it at!