IRC log of #zope3-dev for Tuesday, 2005-02-22

*** sashav has quit IRC00:13
*** hazmat has quit IRC00:13
*** sashav has joined #zope3-dev00:13
*** alga has quit IRC00:30
*** mgedmin has quit IRC00:31
*** niemeyer has quit IRC00:31
*** jhauser_ has quit IRC00:42
*** gintas has quit IRC00:44
*** hazmat has joined #zope3-dev00:49
*** tziade_ has joined #zope3-dev00:55
*** tziade_ is now known as tarek_00:55
*** mexiKON has joined #zope3-dev01:44
*** tarek_ has quit IRC02:04
*** philiKON has quit IRC02:07
Damasceneweird. for half a second looked like a default plone setup heh.02:51
Damascenei wonder if it's some weird IE or squid caching issue on my end02:51
*** hazmat has quit IRC03:49
*** sashav has quit IRC03:53
*** Fosten has joined #zope3-dev06:11
*** d2m has quit IRC07:22
*** Theuni has joined #zope3-dev09:25
*** hdima has joined #zope3-dev09:32
Damascenewow people are awake!09:39
Damasceneoh wait, probably in europe...09:39
*** jhauser has joined #zope3-dev09:41
*** sashav has joined #zope3-dev09:57
*** zagy_ has joined #zope3-dev10:14
*** zagy has quit IRC10:18
*** zagy__ has joined #zope3-dev10:26
*** zagy_ has quit IRC10:34
*** tav_ has joined #zope3-dev10:36
*** tav has quit IRC10:38
*** mooded has joined #zope3-dev10:45
*** tav_ has quit IRC11:02
*** tav has joined #zope3-dev11:27
*** jack-e has joined #zope3-dev11:29
*** MalcolmC has joined #zope3-dev11:29
*** Theuni has quit IRC12:40
*** mooded has left #zope3-dev12:49
*** mgedmin has joined #zope3-dev13:04
*** sashav has quit IRC13:07
mexiKONsrichter, webdav is hosed on the trunk13:12
mexiKONwhen i do cadaver http://localhost:808013:13
mexiKONa) it asks me for credentials (it shouldn't do taht)13:13
mexiKONb) when i give them a zope.Manager account, it throws an error13:13
mexiKONTraceback (most recent call last):13:13
mexiKON  File "/Users/philipp/dev/Zope3/src/zope/app/publication/", line 296, in handleException13:13
mexiKON    name = zapi.getDefaultViewName(exception, request)13:13
mexiKON  File "/Users/philipp/dev/Zope3/src/zope/app/publisher/browser/", line 76, in getDefaultViewName13:13
mexiKON    context, request)13:13
mexiKONComponentLookupError: ("Couldn't find default view name", None, <zope.publisher.http.HTTPRequest instance URL=http://localhost:8080>)13:13
srichterplease file a bug report13:17
*** gintas has joined #zope3-dev13:22
*** regebro has joined #zope3-dev13:52
regebroGood moo.. afternoon, everybody!13:52
*** gintas has quit IRC13:52
regebroIs there a way to get a list of checkboxes as a Widget for some sort of List field or so?13:53
regebroThe multiple selection listbox aint exactly a favourite... ;-)13:53
mgedminI see a MultiCheckBoxWidget13:57
mgedminI haven't used it, though13:57
jhauserlook for which fields this is registered13:57
jhauserI remember it is subtable dependand on the dataformat of the field and vocab or something13:58
regebroWell, too subtle for me obviously...14:00
regebroThe registration is done in ZCML right=14:00
regebroIt doesn't seem to be registered at all. :-/14:01
mgedminI think it is usable with Set fields, but is not registered as the default widget14:02
mgedminyou have to explicitly use a CustomWidgetFactory to choose it14:02
mgedminor perhaps a CustomSequenceWidgetFactory?14:03
* mgedmin shrugs14:03
regebroOK, too complicated. I don't have the time to learn that. Thanks anyway.14:03
mgedminzope 3 widgets need love14:03
mgedmineveryone abandons them because they're too complicated14:03
* mgedmin included14:03
regebroSo obviously we need to do something about that...14:04
BjornTregebro: if you use an addform or editform, you can use <widget field="..." class="..."> to use another widget for a specific field14:04
regebroSo I then make the editform statement into a complex statement (instead of ending it with /> ), right?14:06
regebrotesting......nah. Didn't work. (This is Five).14:08
regebroIncompatible root metatypes. Gah. It will have to wait.14:09
mgedminregebro, a possible simple solution is to keep using the multiselection listbox and render the checkboxes manually in the page template14:14
regebroAnything is possible. Howver, anything that takes more than five minutes is currently out of the question. ;)14:14
mgedmina <tal:repeat > should take five minutes, assuming you already are using the listbox widget and want to replace it with checkboxes14:15
*** niemeyer has joined #zope3-dev14:20
*** jack-e is now known as jack-e|away14:28
*** alga has joined #zope3-dev14:33
*** J1m has joined #zope3-dev14:37
regebromgedmin: No, I'm using an editform. Creating a special form takes more than five minutes. But thanks for your help anyway.14:39
*** gintas has joined #zope3-dev14:46
*** regebro has quit IRC14:46
*** zagy__ is now known as zagy14:58
*** mgedmin has quit IRC15:01
*** Theuni has joined #zope3-dev15:16
*** vlado has joined #zope3-dev15:33
*** tvon has quit IRC15:34
Damascenelooking at the zwiki code, i'm not sure what this means.  "  IWikiPageHierarchy(page)  "  page is a part of his container's items.  is he somehow casting the page using an Interface?  I didn't think interfaces could be treated as constructors at all?15:36
J1msrichter, ayt?15:40
*** gintas has quit IRC15:40
J1mDo we now set __parent__ on adapters automatically?15:40
srichtergood question15:41
srichterparent is set on views during traversal15:41
srichterbut I am not sure about adapters; they must because otherwise security would not work15:41
J1madapters are rarely proxied15:42
srichtersome are; the trusted="true" attribute is used fairly frequently now15:42
srichteractually. every time an adapter involves annotations, which is common in end user applications, I would think15:43
J1mBut these typically get zope.Public15:43
J1mOr, I imagine that their factiries set __parent__15:43
srichterI simply do not know but I guess they would15:44
J1mThe TrustedAdapterFactory sets __parent__15:46
*** sashav has joined #zope3-dev15:51
Damasceneif an adapter creates an instance (with the implementation details of an interface inside) for a single interface.  does a multiadapter create a single instance with multiple adapters's methods implemented in a single instance (the adapted result).16:25
J1mNo, a multiple adapter adapts multiple objects to a single interface.16:26
*** mgedmin has joined #zope3-dev16:37
*** hazmat has joined #zope3-dev16:44
*** gintas has joined #zope3-dev16:52
mgedmincan I use test levels with doctests?16:59
J1mI don't know16:59
mgedminI would like some longer-taking doctests to run only if I run --all16:59
*** srichter has quit IRC17:01
*** ChanServ sets mode: +o tav17:06
Damasceneodd, i don't see where this vocabulary was defined.  vocabulary = "SourceTypes".  i did a find [zope3dir] | xargs grep -i "sourcetypes" and only find references to it, but not the actual list or how it was generated?17:06
mgedminDamascene, src/zope/app/renderer/configure.zcml, line 917:07
Damascenemgedmin:  ugh, yeah i see it now in my find combo haha. thanks17:08
*** hdima has quit IRC17:14
*** mexiKON is now known as philiKON17:20
*** GaryPoster has joined #zope3-dev17:21
mgedmingrr, bugs me again17:28
*** tvon has joined #zope3-dev17:35
*** vlado has quit IRC17:49
*** srichter has joined #zope3-dev18:07
*** srichter has quit IRC18:08
philiKONJ1m, your changing createObject breaks backward compatability18:17
*** srichter has joined #zope3-dev18:17
J1mHow so?18:17
*** ChanServ sets mode: +o srichter18:17
philiKONx3 code will still do zapi.createObject(None, ...)18:17
philiKONnever mind18:18
philiKONi just now saw the BBB18:18
philiKONi thought i had seen that there wasn't any BBB :)18:18
DamascenephiliKON:  curiously enough does your book cover the workflow, from end to finish of a project?  i.e.  for instnace, the zwiki page looks great, but it isn't clear how to get it published on a public site.  i tried throwing up ++skin++wiki to no avail (just shows a blank page) but i'm presuming skins are the proper way to publish a page for public consumption?18:19
srichterDamascene: the book online (and now on the shelves) covers workflows as well18:20
mgedminI find skins useful when I want to override a standard zope page in my application18:21
philiKONsrichter, we're not talking about workflow :)18:21
mgedmine.g. have a nice 404 error page18:21
philiKONDamascene, yes, my book takes a project from day 1 (designing interfaces) up to deployment issues like security18:21
mgedminI do not think you need skins if you only want to publish a new content type18:21
philiKONDamascene, i don't cover deployment explicitly because a) i don't think we've explored that enough yet and b) i didn't have enough time left to do it18:21
philiKONDamascene, as for skins, mgedmin is right; they determine the look and feel of a whole site or section of a site, not of a certain content type18:22
DamascenephiliKON:  right, i just want some general guidance.  for instance, i'd like to manage my site internally using some dns name:8080 via web.  but for public users i use apache to rewrite the url from -> name:8080 internally including the ++skin++ tags.18:22
Damascenemy way "appears" to work, but i'm not sure if that's the way it was supposed to be done.18:23
philiKONthat's a good way to do it18:23
philiKONif you want two different skins, one for the public apache-served view and one for your maangement view18:23
Damascenei figure i stil have http-basic auth protection if they do directly go into the host, etc.18:23
Damascene(although i'd prefer something a bit better heh, but i'll live with that for now).  :)18:24
philiKONin the book i discuss cookie authentication as an example of an alternate authentication method18:24
DamascenephiliKON:  hmm so you talk about sessions somehow?18:25
philiKONno, sessions are not in x3.018:25
philiKONthey were added for 3.118:25
DamascenephiliKON:  hm.  well i'm not sure how cookie auth will work then?  that's relying entirely on the client?  the server has to keep some kind of state of an authenticating cookie 'id' of sorts (to me that's a session of sorts).18:25
philiKONno, the server doesn't keep any state18:26
philiKONit doesn't have to if the authenticated client always provides a cookie18:26
Damascenewell, what's to stop me from forging a cookie then?  or full credentials are stored in the cookie and the server checks every time?18:27
* philiKON looks18:27
philiKONi set two cookies, zope_user and zope_pass18:28
philiKONthis is just very very simple of course18:28
philiKONbut not any less secure than simple-auth18:28
Damasceneokay, so the credentials are stored in the cookies themselves and passed/read/checked for every req.18:28
Damasceneyeah it's about the same level of security as simple-auth18:29
philiKONit serves as an example of doing alternate authentication18:29
Damasceneokay no big deal!18:29
philiKONproblem is that i can't just include 1000 line examples in the book18:29
Damascenejus curious if a hidden nugget of session snuck in there haha.18:29
Damasceneactaully i'm more interested in general concepts with light examples.18:29
philiKONi tried to keep a balance of both in the book18:30
philiKONit's up to you to tell me if i succeeded :)18:30
*** tvon has left #zope3-dev18:30
Damascenehehe... well lately i've been on a money saving spree.  so i'll probably check it out at the local bookstore first.  if i end up reading too much of it there, i'll probably buy it haha.  ;)18:31
* philiKON hopes it makes it to a local bookstore18:31
Damascenewell, barnes and nobles.  :)18:32
philiKONstill, i doubt they have every book ever written in some god-forsaken european country18:33
Damascenewell, maybe i can call them up then and ask them to stock it hah18:34
*** jhauser_ has joined #zope3-dev18:36
*** regebro has joined #zope3-dev18:36
regebroHi! Moral support needed... ;)18:36
regebroWhat should I do of these options:18:36
*** rejj has quit IRC18:37
regebro1. Make widgets for searching amonts users, and widgets for displaying a calendar, and add support to Five for overriding widgets. or...18:37
regebro2. Just make a big ugly temaplate with all this is a big heap.18:38
regebroWhat would YOU have done?18:38
philiKONregebro, you want my answer? ;)18:38
regebroyes, very much. :)18:38
philiKON(searching among users => vocabulary + vocabulary widget)18:38
*** rejj has joined #zope3-dev18:38
philiKONregebro, well, in the interest of Five but also in the interest of the flexibility of your app, i would say #118:38
*** Theuni has quit IRC18:39
regebroOh, I forgot: I am under heavy time pressure, and the reason I have a hard time deciding, is that I cna't clearly see which of these will be faster.18:39
philiKONi just thought about the time issue18:40
philiKONi wouldn't know it either18:40
* philiKON looks at five18:40
philiKONregebro, Five seems not to be missing much for widget overriding, i think18:40
regebroOK, in that case I'll probably go with #1, if it's not clear #2 will be much faster.18:41
DamascenephiliKON:  Five is only for zope 2 -> zope 3 migration projects?  Otherwise, for new development, stright up zope 3 makes the most sense?18:41
regebrophiliKON, no I think it might only be the CustomWidgetMixin that needs transferring to ExtensionClasses.Base.18:41
philiKONDamascene, well, Five is a) for migrating z2-based software and b) when you start a new project and want to use e.g. Plone, CPS, or Silva (or even plain CMF) but also want to use cool z3 technology18:42
philiKONregebro, CustomWidgetMixin?18:42
regebroWell, Damascene, it's for when you have to use Zope2, but wants Zope3 stuff.18:42
regebrophiliKON, yeah, wasn't that the name?18:42
philiKONthere's CustomWidgetFactory, but not sure what that has got to do with it18:43
regebrophiliKON: Hang on.18:43
philiKONregebro, i think we just need to implement the <widget> subdirective to <editform> and <addform>18:43
philiKONyes, CustomWidgetFactory is used there, but i dont' see why it needs to be an ExtensionClass18:43
philiKONregebro, let's head over to #z3-base18:44
*** jhauser has quit IRC18:48
*** tvon has joined #zope3-dev18:56
*** benji_york has joined #zope3-dev18:56
*** J1m has quit IRC18:57
regebroAha! I'm trying to switch out a default widget for a custom widget. But this custom widget (MultiCheckBoxWidget) wants a vocabulary as a parameter.19:17
regebroHowever, if I do nothing, the attendees_widget on my view will be a CustomeWidgetFactory, that when called will try to call the Widget without this parameter.19:17
regebroHow do I fix that? /confused19:18
mgedminuse CustomSequenceWidgetFactory19:20
mgedminI think19:20
mgedminno, that won't work19:21
mgedminok, here's what I do19:21
mgedmin    foo_widget = CustomWidgetFactory(RadioWidgetFactory)19:21
mgedmindef RadioWidgetFactory(field, request):19:22
mgedmin    return RadioWidget(field, field.vocabulary, request)19:22
regebroOK, that makes sense.19:22
regebroAlthough... the field doesn't have a vocabulary... maybe it does.. I'll try.. Think less, test more.  ;)19:24
mgedminregebro, I copied the ChoiceInputWidget function19:25
mgedminand replaced zapi.getAdapter with the specific widget that I wanted to get19:25
regebroI didn't even understand what that means. ;)19:26
*** MalcolmC has quit IRC19:47
regebroYes! I have a MultiCheckBoxField! mgedmin, philiKON, thanks!19:55
philiKONregebro, youre welcome20:01
*** gintas has quit IRC20:03
regebroDoes anybody have a step by step example of making your own fields?21:07
mgedmin1. look at zope 3 source code21:07
mgedmin2. make your own field21:07
mgedmin3. profit21:07
regebroHehe. :)21:08
regebroI'm on 1. now. Whoho!21:08
Damascenecan we skip to 3?21:09
mgedminok, for step 3 you should all send $5 to me21:09
mgedminbecause I have done steps 1 and 2 ;)21:09
*** jdz_ has joined #zope3-dev21:11
regebroWell, I'm on 2 now. ;)21:15
regebroThe field interfaces are for the parameters, right...21:15
regebroQuestions: Can I get the other fields data from the Widget somehow?21:15
mgedminyou're not supposed to do that21:16
mgedminas far as I know21:16
regebroOK, My brain is mush.21:24
regebro'widgets and fields are defintely a bit complex...21:25
* mgedmin nods, sadly21:25
regebroI'll be back tomorrow. See ya! :)21:25
mgedminsee you21:25
*** regebro has quit IRC21:27
*** gintas has joined #zope3-dev21:27
*** J1m has joined #zope3-dev21:55
*** Fosten has quit IRC21:56
*** deo has quit IRC22:16
*** tvon has quit IRC22:21
*** deo has joined #zope3-dev22:28
*** tziade_ has joined #zope3-dev22:43
*** tvon has joined #zope3-dev23:01
*** niemeyer has quit IRC23:18
*** nut has joined #zope3-dev23:29
*** gintas has quit IRC23:45

Generated by 2.15.1 by Marius Gedminas - find it at!