*** mgedmin has joined #zope3-dev | 00:06 | |
*** Aiste has quit IRC | 00:48 | |
*** roym has joined #zope3-dev | 01:10 | |
roym | folks, 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-dev | 01:28 | |
*** SureshZ has quit IRC | 01:55 | |
*** roym has quit IRC | 01:57 | |
*** mgedmin has quit IRC | 02:49 | |
*** Alef has quit IRC | 02:52 | |
*** peaceman_ has joined #zope3-dev | 03:33 | |
*** peaceman has quit IRC | 03:34 | |
*** yota has quit IRC | 03:38 | |
*** sashav has quit IRC | 06:12 | |
*** sashav has joined #zope3-dev | 07:22 | |
*** Volpe has joined #zope3-dev | 08:46 | |
Volpe | Is 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 IRC | 09:46 | |
*** sashav has joined #zope3-dev | 11:05 | |
*** timte has joined #zope3-dev | 12:09 | |
*** jhauser has quit IRC | 12:18 | |
*** M1 is now known as mj | 12:21 | |
*** mj is now known as MJ | 12:23 | |
*** d2m has quit IRC | 12:24 | |
*** jenner has joined #zope3-dev | 12:32 | |
*** timte has quit IRC | 12:41 | |
*** yota has joined #zope3-dev | 12:50 | |
*** d2m has joined #zope3-dev | 12:52 | |
*** projekt01 has joined #zope3-dev | 12:57 | |
*** vlado has joined #zope3-dev | 13:24 | |
*** J1m has joined #zope3-dev | 13:47 | |
*** sashav has quit IRC | 14:02 | |
bob2 | hm | 14:30 |
bob2 | where is the magic of __dict__ explained? | 14:30 |
bob2 | my 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 itself | 14:31 |
bob2 | (this is using formlib again) | 14:32 |
J1m | why are you using browser:form with formlib? | 14:35 |
jenner | Uhm... app/testing.test.py 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 about | 14:38 |
bob2 | hrm, how should I be using formlib? browser:editpage? | 14:39 |
J1m | formlib is used to create forms in *python*. | 14:40 |
bob2 | hmm | 14:40 |
J1m | You then register them with the adapter directive. | 14:40 |
J1m | browser:form and browser:editform are used to define forms in zcml. | 14:40 |
J1m | We eventually realized that Python is a better construction language than zcml. :) | 14:41 |
J1m | jenner, try using a relative path. | 14:41 |
bob2 | hehe | 14:41 |
bob2 | ooh. formlib works by doing adapter lookups on the object, using the view name as the name to lookup? | 14:42 |
J1m | jenner, 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 |
J1m | bob2, no | 14:42 |
jenner | cool | 14:42 |
jenner | Now I'm getting "ValueError: Empty module name" (app/testing/test.py:530), I wonder if I need to provide an additional PYTHONPATH | 14:44 |
J1m | what are you trying to do? | 14:44 |
jenner | J1m: I'm trying to follow the example at http://www.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/Zope3Book/contentobject.html | 14:45 |
J1m | Could you be a bit more specific? | 14:46 |
J1m | Are you trying to test something? | 14:46 |
jenner | J1m: 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 |
jenner | J1m: yes, just run a unit test | 14:46 |
J1m | To run all of the tests: | 14:47 |
jenner | There's a "test" (executable py script)in my $INSTANCE/bin | 14:47 |
J1m | python test.py | 14:47 |
J1m | to run the tests in a particular directory in src: | 14:47 |
J1m | say, zope/app/container: | 14:47 |
J1m | python test.py --dir zope/app/container | 14:47 |
jenner | which "test.py" are we talking about? the one from $ZOPE3_HOME/app/testing/? | 14:48 |
J1m | hm, I summed you were using a checkout. | 14:49 |
J1m | Are you working in an instance? | 14:49 |
jenner | yes | 14:49 |
J1m | so, you have some package in lib/python? | 14:49 |
jenner | (running 3.1.0c2) | 14:50 |
jenner | right, in /usr/lib/python2.4/site-packages | 14:50 |
jenner | oh, sorry, you mean the instance | 14:50 |
wiggy | hm, wet footsteps in philiKON's book | 14:50 |
jenner | yes, there's lib/python | 14:50 |
jenner | wiggy: you bought it? | 14:51 |
J1m | where is the package you want to test? | 14:51 |
wiggy | a while ago, yes | 14:51 |
wiggy | and my cat just decided to walk over it after stepping through some water | 14:51 |
jenner | J1m: I created a $INSTANCE/src (as suggested in the tutorial) and added a book/__init__.py and a book/messageboard/__init__.py (I can import book.messageboard in python2.4 from the $INSTANCE/src directory) | 14:52 |
J1m | The tutorial is based on a checkout. | 14:52 |
jenner | right, 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 |
J1m | The directory layout is different. | 14:53 |
wiggy | it would be nice if the README in the checkout explained how to make an instance as well | 14:53 |
J1m | In an instance, the lib/python directory plays the same role as src. | 14:53 |
jenner | for instance, bin/pyskel worked quite well, I just had to call it as `PYTHONPATH=src/ bin/pyskel <args>` | 14:53 |
jenner | ah, thanks | 14:53 |
J1m | so, if your package is named foo and is in lib/python, then, from an instance, use: | 14:54 |
J1m | bin/test --dir foo | 14:54 |
bob2 | hm, is there any example code that uses formlib in a real application? | 14:55 |
wiggy | if I have a content type which is a container but also has some other data | 14:55 |
wiggy | what is the best way to browse through it from the ZMI? | 14:55 |
wiggy | object/@@contents.html doesn't seem to work | 14:56 |
J1m | bob2. I don't know if there are any public examples. I think Martijn just released some software that uses it though. | 14:57 |
jenner | J1m: ok, I moved the stuff from $INSTANCE/src to $INSTANCE/lib/python, the error is still the same (ValueError: Empty module name) - http://paste.plone.org/3759 | 14:57 |
J1m | wiggy, depends on your content type. You won't get contents.html unless you register a view that provides it. | 14:58 |
J1m | jenner, don't inlcude lib/python in the --dir argument. | 14:59 |
J1m | bin/test -vpu --dir book/messageboard | 14:59 |
J1m | also, just try: | 14:59 |
J1m | bin/test -vpu | 15:00 |
jenner | J1m: yay, now it's working, thanks (although I get a bunch of errors, like AttributeError: MessageBoard instance has no attribute 'values') | 15:00 |
jenner | J1m: muchos gracias | 15:00 |
wiggy | J1m: hm, is there a default view I can use? | 15:01 |
wiggy | I can only find views for workflows and sitemanagement | 15:01 |
J1m | use the api doc to read about the browser:containerViews zcml directive. | 15:02 |
jenner | Hm, I guess the IContainer interface changed since the tutorial was written | 15:02 |
J1m | jenner, I don't think so | 15:03 |
*** timte has joined #zope3-dev | 15:04 | |
jenner | J1m: so those 12 errors and one failure (http://paste.plone.org/3760) can be ignored? | 15:04 |
J1m | so | 15:05 |
J1m | no | 15:05 |
J1m | Test errors generally may not be ignored. | 15:05 |
jenner | Then either the tutorial is outdated or the test suite for IContainer has changed :) | 15:06 |
J1m | You aren't testing container | 15:06 |
J1m | You are testing your message board code. | 15:06 |
jenner | Yes, and it implements IContainer. According to the tutorial a basic test suite is provided by zope.app.container.tests.test_icontainer.TestSampleContainer, which is what I'm calling in my test_messageboard.py | 15:08 |
J1m | What tutorial are you refering to? | 15:08 |
jenner | http://www.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/Zope3Book/contentobject.html | 15:08 |
J1m | Ah, that isn't the tutoroal | 15:09 |
J1m | Ah, that isn't the tutorial | 15:09 |
J1m | That's the zope book. | 15:09 |
J1m | That's the zope 3 book. | 15:09 |
J1m | I'm sure that test is fine. | 15:09 |
J1m | Your message board implementation is broken. | 15:09 |
jenner | Hmpf, sorry, you're right of course... forgot to inherit from BTreeContainer, that's why the test couldn't find the appropriate methods | 15:14 |
wiggy | ah, got the container view working | 15:24 |
jenner | shouldn't a content type have s.th. like "implements(... IAttributeAnnotatable ...)" in its implementation if it has an <implements interface="zope.app.annotation.interfaces.IAttributeAnnotatable" /> in its configure.zcml? | 15:41 |
wiggy | no, it's one or the other | 15:42 |
J1m | right | 15:42 |
jenner | ah | 15:42 |
wiggy | they are two ways to add marker interfaces | 15:43 |
wiggy | decorations would be a nice 3rd, not sure if that's possible now | 15:44 |
J1m | yes, for functions | 15:44 |
J1m | decorators don't work for classes in python | 15:44 |
wiggy | ah, right | 15:44 |
wiggy | that still annoys me | 15:44 |
jenner | zope.configuration.config.ConfigurationConflictError: Conflicting configuration actions | 15:45 |
jenner | http://paste.plone.org/3762 | 15:45 |
J1m | You have to directives trying to configure the same thing | 15:47 |
J1m | actually, trying to provide the same component | 15:48 |
*** J1m has left #zope3-dev | 15:48 | |
jenner | the error referes line 35.2-54.2 in both cases | 15:49 |
jenner | got 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-dev | 16:03 | |
*** roym has joined #zope3-dev | 16:09 | |
roym | When I use a template="" directive in an <editform> stanza, is it | 16:12 |
roym | always necessary to use the class="" parameter as well? | 16:12 |
roym | I am trying to figure out which method gets invoked in the action class (whatever that is?) | 16:16 |
bob2 | hm, I trawled the whole codespeak z3 svn repository | 16:16 |
bob2 | and nothing seemed to use formlib | 16:17 |
*** ksmith has joined #zope3-dev | 16:37 | |
*** ksmith has left #zope3-dev | 16:37 | |
roym | never 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 editview.py! | 17:19 |
*** jenner has quit IRC | 17:21 | |
*** lunatik has joined #zope3-dev | 17:59 | |
*** lunatik has left #zope3-dev | 17:59 | |
roym | hi, does anyone know if using sql: expressions in zpt pages | 18:13 |
roym | (w/sql_conn) is meant to be multi-threaded - or will requests be queued. | 18:13 |
srichter | roym: what do you mean by multi-threaded? | 18:17 |
srichter | all the sql: expression does is to create a query (pretty much like SQLMethod) and pass it to the sql_conn | 18:18 |
srichter | so the semantics are the same | 18:19 |
roym | srichter: 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 |
roym | just wondering if you knew | 18:30 |
wiggy | I have an content type that is attribute annotable | 18:30 |
wiggy | but if I try to get to its annotations I get a nasty exception saying ForbiddenAttribute: ('__annotations__',..) | 18:30 |
wiggy | what might that be? | 18:30 |
*** mgedmin has joined #zope3-dev | 18:56 | |
*** vlado has quit IRC | 18:57 | |
*** lunatik has joined #zope3-dev | 19:05 | |
projekt01 | argh, 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 |
projekt01 | that's not working if I login as a principal which has the group | 19:08 |
projekt01 | I really love this location less part at z3 ;-( | 19:10 |
projekt01 | srichter, 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-dev | 19:22 | |
*** tiredbones has joined #zope3-dev | 19:34 | |
*** sashav has joined #zope3-dev | 19:46 | |
*** philiKON has joined #zope3-dev | 19:47 | |
*** vlado has quit IRC | 19:50 | |
*** peaceman has joined #zope3-dev | 19:52 | |
*** peaceman_ has quit IRC | 19:56 | |
*** sm has joined #zope3-dev | 20:25 | |
sm | hi all | 20:26 |
projekt01 | hi | 20:26 |
sm | I think this would be a good place to find martijn faassen ? | 20:26 |
philiKON | sm, yes, on week days | 20:27 |
projekt01 | ;-) | 20:27 |
philiKON | sm, this channel, or #z3-base or #silva | 20:27 |
sm | great | 20:28 |
sm | z3 seems to be rocking along, as ever | 20:29 |
*** lunatik has left #zope3-dev | 20:30 | |
srichter | roym: 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 mechanism | 21:06 |
srichter | wiggy: you need to make the adapter that uses the annotation a trusted adapter | 21:06 |
srichter | so that the context, i.e. the object, is not security proxied | 21:07 |
srichter | projekt01: it would be good if you could isolate the problem and write a test demonstrating it. | 21:08 |
wiggy | srichter: how do I do that? | 22:00 |
srichter | in your ZCML directive say: trusted="True" | 22:06 |
*** timte has quit IRC | 22:10 | |
*** tvon has quit IRC | 22:18 | |
*** timte has joined #zope3-dev | 22:33 | |
*** tvon has joined #zope3-dev | 22:37 | |
wiggy | ForbiddenAttribute: ('chooseName' | 22:38 |
wiggy | different error but still no go :) | 22:38 |
*** horizon5 has joined #zope3-dev | 22:45 | |
*** timte has quit IRC | 23:16 | |
*** ksmith has joined #zope3-dev | 23:38 | |
*** Aiste has quit IRC | 23:43 | |
projekt01 | srichter, I think the problem are non traversable objects where get checked via the canWrite or canAccess method | 23:45 |
projekt01 | srichter, is it not possible to provide security for non traversable objects where provide correct parents? | 23:46 |
projekt01 | srichter, 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 irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!