IRC log of #zope3-dev for Friday, 2005-05-27

*** regebro has quit IRC00:10
timtephiliKON: I'm half through your book. One thing I'm missing is explanations of @@. I've seen it in a few examples so far, but does not know what it means. Maybe I missed the explanation, is it there?00:10
*** yota has quit IRC00:16
philiKONtimte, yes, it's there00:18
philiKONin chapter 3 i think00:18
timtephiliKON: ok, forgot it then i guess00:19
philiKONtimte, page 3100:19
timtephiliKON: you've got good memory00:20
*** SureshZ has left #zope3-dev00:36
*** mexiKON has joined #zope3-dev00:36
*** philiKON has quit IRC00:45
*** mexiKON is now known as philiKON00:46
*** J1m has quit IRC00:56
*** bradb has quit IRC01:03
*** timte has quit IRC01:10
*** hazmat has joined #zope3-dev01:50
*** elbixio has joined #zope3-dev02:04
*** bskahan has joined #zope3-dev02:26
*** bradb has joined #zope3-dev02:32
*** SureshZ has joined #zope3-dev02:49
*** projekt01 has quit IRC03:21
*** deo has quit IRC03:52
*** BjornT_ has joined #zope3-dev04:06
*** stub has joined #zope3-dev04:07
*** BjornT has quit IRC04:23
*** bskahan has quit IRC04:27
*** bskahan has joined #zope3-dev04:28
*** projekt01 has joined #zope3-dev04:30
*** bskahan has quit IRC04:44
*** hazmat has quit IRC05:08
*** projekt01 has quit IRC05:40
*** bradb has quit IRC05:49
*** elbixio has joined #zope3-dev05:50
*** BjornT_ has quit IRC06:19
*** MiUlEr has joined #zope3-dev06:31
*** hazmat has joined #zope3-dev06:35
*** elbixio has quit IRC07:04
*** SureshZ has left #zope3-dev07:08
*** BjornT has joined #zope3-dev07:13
*** timte has joined #zope3-dev08:20
*** zagy has joined #zope3-dev08:37
*** d2m has joined #zope3-dev09:12
*** guido_g has quit IRC09:15
*** yota has joined #zope3-dev09:30
*** sashav has joined #zope3-dev09:32
*** hdima has joined #zope3-dev09:39
*** elbixio has joined #zope3-dev09:47
*** elbixio has quit IRC09:54
*** guido_g has joined #zope3-dev09:59
*** Theuni has joined #zope3-dev10:07
*** __gotcha has quit IRC10:10
*** __gotcha_ has joined #zope3-dev10:10
*** __gotcha_ is now known as __gotcha10:10
*** __gotcha has quit IRC10:14
*** deo has joined #zope3-dev10:15
*** __gotcha_ has joined #zope3-dev10:15
*** __gotcha_ is now known as __gotcha10:15
*** gintas has joined #zope3-dev10:24
*** __gotcha has quit IRC10:38
*** __gotcha_ has joined #zope3-dev10:38
*** __gotcha_ is now known as __gotcha10:38
*** lunatik has joined #zope3-dev10:42
guido_ghi all11:29
guido_ghow can I set the (default) context for utility lookups?11:30
VladDracguido: you might mean setSite()11:30
VladDracdepending on what your problem specifically is :)11:31
VladDracmy problem was that if you create a sitemanager and access local utilities within the same request, you need to do an explicit setSite() for that request11:31
VladDrac(see my mail on zope3-dev to jw)11:31
*** lunatik has left #zope3-dev11:32
guido_gfound it on zope3 user ml, thanks11:37
guido_gand it works! you rock! :)11:38
VladDractx :)11:45
*** ignas has joined #zope3-dev11:53
*** mgedmin has joined #zope3-dev12:09
*** faasse1 has joined #zope3-dev12:15
guido_gj-w and me are indeed working on the same project12:17
guido_git's a document library application, where you can uplaod/administer documents12:18
guido_gvery short, it's a meta-data system for the documents they want to make public12:18
guido_gof course, there're lots of special ideas... as usual12:19
VladDrachmm ok12:23
VladDracI hope to release some of my code soon - perhaps you can reuse some12:24
guido_gI'm not sure about the release policy of this project12:25
guido_gwill ask Martijn...12:25
*** mooded has joined #zope3-dev12:25
guido_g... ok, now going to ask Kit...12:34
guido_g.. finished12:36
guido_gVladDrac: the first demo is here:
VladDracnice http auth popup :)12:38
guido_gcomes for free with your browser, we thought we make use of it :)12:39
guido_gunfortunately the code is in our internal cvs12:39
VladDracguido: textindexng might be usefull to index documents - I recently "ported" it to zope312:39
VladDrac(the cvs version should actually work)12:39
guido_gsaw the announcement :)12:40
guido_gbut for now the upload is ignored anyway12:40
guido_gwhat's your current project then?12:41
*** Aiste has joined #zope3-dev12:41
VladDraca mini cms for a very simple community site12:43
VladDracbasically a toy project to get to learn zope312:43
VladDracusing as many standard zope3 components as possible12:43
timteVladDrac: how many req/s do you get?12:44
VladDractimte: 0 :)12:45
VladDrac(unless I'm testing)12:45
VladDrac(the site's not there, yet)12:45
guido_gahh :)12:45
VladDracthe class you define as class for your template is accessible as 'view' in the associated template, right?12:52
VladDracwhat happens if you nest templates (i.e. macro's)?12:53
VladDracI have the impression my macro is accessing the "wrong" view12:53
guido_ghmmm... good question12:54
guido_gI've a form (the 'Find' from the documents folder) which uses the zmi macros, this seems to work12:55
VladDracwell if I request the template containing the macro directly, it works. If I access it as a nested macro in an outer template, I get an attribute error12:56
VladDracdriving me nuts13:01
* VladDrac 's stuck on something trivial again13:01
* VladDrac had hoped that would stopped after 6 weeks13:01
guido_ghow do you call the macro?13:02
VladDrac     <metal:tree use-macro="context/@@visitortree/visitortree" />13:02
guido_ghmmm... hmmm...13:03
*** regebro has joined #zope3-dev13:07
guido_gdid you hvae a look at
guido_gthere is a class based view defined for @@standard_macros13:07
guido_gthe view class simply sets the class attribute macro_pages13:08
guido_gbut I might be confused13:08
*** mkerrin has joined #zope3-dev13:22
*** mkerrin has left #zope3-dev13:22
VladDrac  File "/home/ivo/Projects/Zope3/Zope3-svn/src/zope/app/publisher/browser/", line 433, in __call__13:22
VladDrac    raise AttributeError("__call__")13:22
*** mkerrin has joined #zope3-dev13:22
* VladDrac cries13:22
VladDracZope3 has passed Plone and Zope by non-descriptive errormessages by far, now13:23
*** MiUlEr has quit IRC13:25
VladDracfor some reason, my class only works if I define __call__ (returning self)13:26
philiKONwhat class?13:27
VladDracthe class I'm trying to register as a view13:27
VladDrachmm wait13:29
VladDracit's the implicit calling nature of tal13:29
*** d2m_ has joined #zope3-dev13:31
VladDracok I think I slowly start to understand stuff13:31
*** mooded has quit IRC13:32
*** mgedmin has quit IRC13:32
*** yota has quit IRC13:32
*** d2m has quit IRC13:32
*** philiKON has quit IRC13:32
*** d2m_ is now known as d2m13:32
*** philiKON has joined #zope3-dev13:37
*** mooded has joined #zope3-dev13:38
*** mgedmin has joined #zope3-dev13:38
*** yota has joined #zope3-dev13:38
srichterguido_g: your URL is useless without a login/password pair :-)13:45
guido_gI know ]:->13:46
guido_gbut I had to ask for permission for VladDrac, 'cause this is a demo for the customer13:46
guido_gI think for you, there isn't anything worth to see :)13:47
* guido_g is out for lunch13:47
*** mgedmin has quit IRC13:48
*** yota has quit IRC13:48
*** mooded has quit IRC13:48
*** mooded has joined #zope3-dev13:50
*** mgedmin has joined #zope3-dev13:50
*** yota has joined #zope3-dev13:50
*** srichter has quit IRC13:51
*** __gotcha_ has joined #zope3-dev13:53
*** __gotcha has quit IRC13:53
*** __gotcha_ is now known as __gotcha13:53
*** JZ has joined #zope3-dev13:54
*** hazmat has quit IRC13:57
*** faasse1 is now known as faassen13:58
*** deo has quit IRC14:16
*** mgedmin has quit IRC14:17
*** yota has quit IRC14:17
*** mooded has quit IRC14:17
*** alga has joined #zope3-dev14:18
*** mooded has joined #zope3-dev14:19
*** mgedmin has joined #zope3-dev14:19
*** yota has joined #zope3-dev14:19
*** Aiste has quit IRC14:21
*** Aiste has joined #zope3-dev14:21
*** jinty has joined #zope3-dev14:22
*** MacYET has joined #zope3-dev14:27
*** JZ has quit IRC14:32
*** tvon has quit IRC14:32
*** d2m has quit IRC14:34
*** d2m_ has joined #zope3-dev14:35
*** d2m_ is now known as d2m14:35
*** Theuni has quit IRC14:35
*** srichter has joined #zope3-dev14:54
*** ChanServ sets mode: +o srichter14:54
*** JZ has joined #zope3-dev14:55
*** stub has quit IRC15:02
*** d2m has quit IRC15:19
*** mgedmin has quit IRC15:24
VladDracwhat's the best way to, given a SiteManager, find its parent (the "site root", basically?)15:52
*** MiUlEr has joined #zope3-dev15:55
*** jinty has quit IRC15:59
VladDracso zapi.getParent(getSiteManager(self.context)) would do?15:59
guido_gis there a way to get the current request when your're not in a view?16:01
philiKONVladDrac, ypu16:01
philiKONwe really need a zapi.getSite()16:01
philiKONguido_g, no16:01
guido_gphiliKON: thanks16:01
VladDracacquire it!16:01
philiKONif you need the request, your component is either a view (by definition) or it does too much16:01
* VladDrac ducks16:01
*** __gotcha has quit IRC16:01
guido_gI'm sending out emails from a event handler16:02
guido_gthese mails have to contain the abs. url of the thing touched16:02
guido_gso the mail stuff is decoupled from the actual form handling, I thought this would be the right way...16:04
guido_g... obviously it isn't16:04
VladDracguido: srichters book has an example of sending mail from zope316:04
guido_gthx, but the mail sending is working fine16:04
guido_git uses DTMLPage for the templates ]:->16:05
guido_gI really just need the f... absolute url of the object16:05
*** tvon has joined #zope3-dev16:06
*** JZ has quit IRC16:07
guido_ghuh? what do you mean?16:08
* MacYET fights16:08
srichterguido_g: you need the URL right?16:09
srichterso there it is16:10
guido_gsrichter: but I'm not in a view, so I don't have a request, that's the problem16:10
srichtera URL without a request does not make sense16:11
srichteryou can always create a simple TestRequest object though16:11
guido_gthat's why I asked if there is a way to get to the current request when your're not in a view16:11
guido_gbecause the place where i need the url is an event handler16:11
srichterno, only view know about requests16:11
srichterso, probably you want to send the URL as part of the event16:12
guido_gyes, have to do it this way then16:12
srichterbtw, this is not a bad thing16:12
philiKONguido_g, have the view pass the absolute url to the mail routine16:12
philiKONwait, you're in an event handler, right?16:13
srichterapplications can do those sort of specific things16:13
philiKONwe need traversal events16:13
philiKONthey could solve this problem16:13
*** niemeyer has joined #zope3-dev16:14
*** SureshZ has joined #zope3-dev16:14
philiKONguido_g, there's a trick16:16
philiKONit's not too nice16:16
*** projekt01 has joined #zope3-dev16:16
philiKONbut it's at least not butt ugly16:16
philiKONzope's security machinery has the concept of an interaction16:16
philiKONthey are sort of the transactions of the security machinery16:16
philiKONprincipals can participate at interactions through participation objects16:16
philiKONthe request is such a participation object16:17
philiKONthe interaction is stored in a thread globla16:17
guido_gok ok... my brain already starts to hurt :)16:18
VladDractraversal events?16:18
philiKONVladDrac, yes, object events sent out before and after traversal16:18
VladDracit's in
srichterthere are no after traverdsal events :-)16:19
srichteronly before traversal16:19
philiKONguido_g, anyway, you can get the interaction with
philiKONVladDrac, is IBeforeTraverseEvent sent out as an object event or by itself?16:19
srichterbut that's commonly no problem, since you can handle everything with before traversal events16:19
*** JZ has joined #zope3-dev16:19
philiKONsrichter, well, not really16:19
philiKONsrichter, if your app raises an exception...16:19
VladDracphil not sure what you mean16:20
philiKONguido_g, you can loop over the participations within an interaction by looping over the .participations attribute16:20
srichterbtw, I have demonstrated the use of IBeforeTraversalEvent in my recent preferences demo, where the skin is set by a preference16:20
philiKONguido_g, normally the first and only one should be the request16:20
guido_gphiliKON: thx, will save this16:21
*** bradb has joined #zope3-dev16:21
srichter(I personally think this is a really ugly hack and sending the URL as part of the event is much cleaner)16:21
philiKON>>> from import queryInteraction16:22
philiKON>>> from zope.publisher.interfaces import IRequest16:22
philiKON>>> interaction = queryInteraction()16:22
philiKON>>> if interaction is not None and interaction.participations:16:22
philiKON...     request = interaction.participations[0]16:22
philiKON...     assert IRequest.providedBy(request)16:22
philiKONyes, it's a hack16:22
guido_gsrichter: rrright, that's what I do now16:22
philiKONsending it via the event obj is cleaner but not possible all the time16:23
philiKONe.g. when using pre-defined events16:23
srichterright, but that's not the case here :-)16:24
philiKONok. didn't konw16:24
VladDracdoes anyone know right away where the elements of the navigation tree are generated?16:24
guido_gno, I can define whatever event I want.. luck is on my side... this time :)16:24
VladDracfound it16:24
BjornTphiliKON: you're approach isn't always possible as well. it wouldn't work with FTP requests for example16:24
philiKONyeah, then i'd do notify(MyEvent(absolute_url()))16:25
philiKONBjornT, why not?16:25
BjornTphiliKON: how do you get a HTTP-URL from a FTP request?16:26
*** projekt01 has quit IRC16:26
philiKONis absolute_url only possible for HTTP? oh well, if that's the case...16:26
srichteryeah, absolute URL is HTTP specific16:27
philiKONthough urls *can* exist for ftp16:27
philiKONwe might just not support 'em16:27
srichterbtw, in those cases creating a TestRequest object might be ok16:27
srichterit sould be application-specific, since you might need to specify app-specific parameters, but other than that it should work most of the time16:28
VladDracwhat would context/@@foo be in pythoncode?16:31
philiKONgetAdapter((context, request), name='foo')16:32
srichtergetMultiAdapter((context, request), name='foo')16:33
srichteror did I miss a change?16:33
philiKONuh, of course16:33
srichterthough I think you are right and we should switch to getAdapter16:34
srichterfor simple cases we are using IFace(obj) anyways16:34
VladDrachmm, zapi.absoluteURL(c, r) != getAdapter((c, r), name="absolute_url")16:39
srichterYou have to use getMultiAdapter16:40
VladDracbut still, they're different16:40
VladDrac(unicode str versus
srichterof course you have to call the adapter16:43
VladDracI want breadcrumbs16:45
VladDracand getMultiAdapter((c, r), name="absolute_url").breadcrumbs() works fine for me16:45
VladDrac(zapi.absoluteURL(c,r).breadcrumbs() doesn't )16:45
VladDracmy point is, I assumed zapi.absoluteURL would be a nice shortcut, but it's different16:45
philiKONzapi.absoluteURL() is a short cut if all you want is the url as a unicode string16:48
philiKONif you want more, you need to look up the view16:48
*** bskahan has joined #zope3-dev16:57
*** BjornT has quit IRC17:01
*** mkerrin has quit IRC17:10
*** sashav has quit IRC17:17
*** hdima has quit IRC17:18
*** mooded has quit IRC17:24
*** BjornT has joined #zope3-dev17:27
VladDracmy heavily-simplified-navigationtree works17:28
*** bskahan has quit IRC17:32
*** JZ has left #zope3-dev17:33
*** Aiste has quit IRC17:34
VladDrac(along with a nice piece of recursive tal :)17:34
srichteryeah, macros are great for that17:35
*** SteveA is now known as SteveA|afk17:39
*** bskahan has joined #zope3-dev17:45
*** dagnachew has joined #zope3-dev18:04
*** guido_g has quit IRC18:04
*** jinty has joined #zope3-dev18:28
*** guido_g has joined #zope3-dev18:38
*** jinty has quit IRC18:38
*** vlado has joined #zope3-dev18:40
*** faassen has quit IRC18:56
*** mkerrin has joined #zope3-dev18:59
*** dagnachew has quit IRC19:00
*** tarek has joined #zope3-dev19:06
*** bskahan has quit IRC19:16
*** SteveA|afk is now known as SteveA19:19
*** mkerrin has quit IRC19:22
*** Aiste has joined #zope3-dev19:23
*** vlado has quit IRC19:23
*** SureshZ has quit IRC19:24
*** elbixio has joined #zope3-dev19:33
*** Aiste has quit IRC19:34
*** Aiste has joined #zope3-dev19:39
*** projekt01 has joined #zope3-dev19:40
elbixiohello everybody. is there any way to plot a chart using zope3? if there isn't, how would you recommend to do it?19:44
ignaspyGame, save png and load it :)19:46
gintasPIL (Python Imaging Library)19:50
projekt01Perhaps with ImageMagic?19:51
MacYETimagemagic does no graphs19:52
MacYETalso pil does not graphs19:52
philiKONgnuplot: set terminal png19:52
MacYETgnuplot is the swiss knife for making any kind of charts19:53
projekt01That's true19:53
elbixiois gnuplot the one used in octave?19:53
elbixioMacYET: do you know matlab?19:55
MacYETalgebra stuff19:55
projekt01Perhaps pygdchart does fit19:56
elbixiomatrix and algebra stuff19:56
* MacYET calculates the eigenwert of elbixio 19:56
*** bskahan has joined #zope3-dev19:59
philiKONMacYET, eigenvalue20:08
regebroIt's always 0. ;)20:10
*** bskahan has quit IRC20:18
elbixioprojekt01:  pygdchart2 seems really simple to use20:18
elbixioprojekt01: for a newbie like me :)20:19
*** srichter has quit IRC20:21
*** regebro has quit IRC20:24
*** gintas has quit IRC20:25
*** mkerrin has joined #zope3-dev20:25
*** SureshZ has joined #zope3-dev20:31
*** MacYET has left #zope3-dev20:32
*** MiUlEr has quit IRC20:34
*** ignas has quit IRC20:35
*** hazmat has joined #zope3-dev20:36
*** elbixio has quit IRC20:51
*** MiUlEr has joined #zope3-dev20:52
*** hazmat has quit IRC20:55
*** zagy_ has joined #zope3-dev20:57
*** alga has quit IRC21:02
*** hazmat has joined #zope3-dev21:02
*** Aiste has quit IRC21:06
*** zagy has quit IRC21:06
*** hazmat has quit IRC21:08
*** hazmat has joined #zope3-dev21:09
*** srichter has joined #zope3-dev21:12
*** ChanServ sets mode: +o srichter21:12
*** hazmat has quit IRC21:19
*** hazmat has joined #zope3-dev21:25
*** gintas has joined #zope3-dev21:26
*** _projekt01 has joined #zope3-dev21:36
*** projekt01 has quit IRC21:36
*** MiUlEr has quit IRC21:39
*** hazmat has quit IRC21:51
*** MiUlEr has joined #zope3-dev21:56
*** Aiste has joined #zope3-dev22:15
*** hazmat has joined #zope3-dev22:17
*** hazmat has quit IRC22:25
*** SteveA is now known as SteveA|afk22:33
*** d2m has joined #zope3-dev22:58
*** mkerrin has quit IRC23:13
*** MiUlEr has quit IRC23:37
*** MiUlEr has joined #zope3-dev23:37

Generated by 2.15.1 by Marius Gedminas - find it at!