*** yota has joined #zope3-dev | 00:02 | |
*** dobee has quit IRC | 00:02 | |
*** dobee has joined #zope3-dev | 00:07 | |
*** regebro has quit IRC | 00:16 | |
*** tarek has quit IRC | 00:33 | |
*** dobee has quit IRC | 00:38 | |
*** norro has quit IRC | 00:46 | |
*** gberdyshev_ has quit IRC | 00:48 | |
*** flox has joined #zope3-dev | 00:56 | |
*** b52lap has quit IRC | 00:59 | |
*** benji has quit IRC | 00:59 | |
*** b52lap has joined #zope3-dev | 01:03 | |
*** sp0cksbeard has quit IRC | 01:08 | |
*** timte has quit IRC | 01:14 | |
*** greenman has joined #zope3-dev | 01:15 | |
*** aclark|away is now known as aclark | 01:21 | |
*** greenman has quit IRC | 01:22 | |
*** greenman has joined #zope3-dev | 01:23 | |
*** flox has left #zope3-dev | 01:23 | |
*** RaFromBRC is now known as RaFromBRC|lunch | 01:28 | |
*** aclark is now known as aclark|dinner | 01:40 | |
*** greenman has quit IRC | 01:47 | |
*** jamur2 has quit IRC | 01:48 | |
*** alga has joined #zope3-dev | 01:50 | |
*** whit has quit IRC | 01:50 | |
*** J1m has quit IRC | 01:52 | |
*** lurkymclurkleton has quit IRC | 02:05 | |
*** aclark|dinner is now known as aclark | 02:06 | |
*** yota has quit IRC | 02:11 | |
*** nathany has quit IRC | 02:16 | |
*** tdoggette has joined #zope3-dev | 02:23 | |
*** greenman has joined #zope3-dev | 02:26 | |
*** malthe is now known as malthe|Zzz | 02:30 | |
*** greenman_ has joined #zope3-dev | 02:35 | |
*** whit has joined #zope3-dev | 02:43 | |
*** greenman has quit IRC | 02:50 | |
*** greenman_ has quit IRC | 02:53 | |
*** greenman has joined #zope3-dev | 02:54 | |
*** RaFromBRC|lunch is now known as RaFromBRC | 02:58 | |
*** b52lap has quit IRC | 03:37 | |
*** srichter has quit IRC | 03:46 | |
*** deo has joined #zope3-dev | 03:46 | |
*** whitmo has joined #zope3-dev | 04:15 | |
*** whit has quit IRC | 04:29 | |
*** greenman has quit IRC | 05:05 | |
*** romanofs1i has joined #zope3-dev | 05:05 | |
*** romanofski has quit IRC | 05:05 | |
*** greenman has joined #zope3-dev | 05:06 | |
*** pcardune has joined #zope3-dev | 05:18 | |
*** hazmat has joined #zope3-dev | 05:24 | |
*** ChanServ sets mode: +o hazmat | 05:24 | |
*** greenman has quit IRC | 06:02 | |
*** greenman has joined #zope3-dev | 06:03 | |
*** whitmo has quit IRC | 06:18 | |
*** pcardune has quit IRC | 06:35 | |
*** greenman has quit IRC | 06:40 | |
*** rcrafton has quit IRC | 06:41 | |
*** greenman has joined #zope3-dev | 06:41 | |
*** reco has quit IRC | 06:42 | |
*** dobee has joined #zope3-dev | 06:54 | |
*** dobee has quit IRC | 06:54 | |
*** dobee has joined #zope3-dev | 06:55 | |
*** stub has joined #zope3-dev | 07:02 | |
*** srichter has joined #zope3-dev | 07:02 | |
*** mcdonc has quit IRC | 07:03 | |
*** tdoggette has quit IRC | 07:07 | |
*** hazmat has quit IRC | 07:10 | |
*** binseer has joined #zope3-dev | 07:18 | |
*** greenman has quit IRC | 07:37 | |
*** vimes656 has joined #zope3-dev | 07:53 | |
*** hazmat has joined #zope3-dev | 08:16 | |
*** ChanServ sets mode: +o hazmat | 08:16 | |
*** kursor_ has joined #zope3-dev | 08:31 | |
*** dobee has quit IRC | 08:32 | |
*** jukart has joined #zope3-dev | 08:38 | |
*** jayaraj has joined #zope3-dev | 08:38 | |
*** RaFromBRC has quit IRC | 08:43 | |
*** mcdonc has joined #zope3-dev | 08:43 | |
*** jodok has joined #zope3-dev | 08:43 | |
*** timte has joined #zope3-dev | 08:48 | |
*** quodt has joined #zope3-dev | 08:57 | |
*** sorindregan has joined #zope3-dev | 09:38 | |
*** agroszer has joined #zope3-dev | 09:41 | |
*** charith_para has joined #zope3-dev | 09:43 | |
*** norro has joined #zope3-dev | 10:07 | |
*** afd_ has joined #zope3-dev | 10:12 | |
*** thruflo has joined #zope3-dev | 10:21 | |
*** tarek has joined #zope3-dev | 10:32 | |
*** menesis has joined #zope3-dev | 10:40 | |
*** MJ has joined #zope3-dev | 10:42 | |
*** menesis has quit IRC | 10:43 | |
*** menesis has joined #zope3-dev | 10:43 | |
*** stub has quit IRC | 10:47 | |
*** seletz has joined #zope3-dev | 10:49 | |
*** flox has joined #zope3-dev | 10:51 | |
*** bigkevmcd has joined #zope3-dev | 10:56 | |
*** flox has quit IRC | 10:59 | |
*** flox has joined #zope3-dev | 10:59 | |
*** stub has joined #zope3-dev | 11:03 | |
*** vimes656 has quit IRC | 11:03 | |
*** romanofs1i is now known as romanofski | 11:04 | |
*** jayaraj has quit IRC | 11:05 | |
*** vimes656 has joined #zope3-dev | 11:06 | |
*** markusleist has quit IRC | 11:06 | |
*** jayaraj has joined #zope3-dev | 11:07 | |
*** stub has quit IRC | 11:10 | |
*** yotaff has joined #zope3-dev | 11:11 | |
*** b52laptop has joined #zope3-dev | 11:12 | |
*** kursor_ has quit IRC | 11:13 | |
*** kursor has joined #zope3-dev | 11:14 | |
*** ktwilight_ has joined #zope3-dev | 11:21 | |
*** yvl has joined #zope3-dev | 11:31 | |
*** maurits has joined #zope3-dev | 11:31 | |
*** ktwilight has quit IRC | 11:37 | |
*** stub has joined #zope3-dev | 11:39 | |
*** malthe|Zzz is now known as malthe | 11:39 | |
*** mkerrin has joined #zope3-dev | 11:41 | |
*** malthe has quit IRC | 11:50 | |
*** greenman has joined #zope3-dev | 12:03 | |
*** projekt01 has joined #zope3-dev | 12:05 | |
*** junkafarian_ has joined #zope3-dev | 12:26 | |
*** amleczko has joined #zope3-dev | 12:28 | |
*** junkafarian_ is now known as junkafarian | 12:33 | |
amleczko | hi, i have a problem with opened zodb connections. i want to execute method in new thread like here: http://pastebin.com/m49bbef2c. it seems to work - i just got "ZODB.POSException.ConnectionStateError: Cannot close a connection joined to a transaction" when trying to invoke any http request | 12:37 |
---|---|---|
*** amleczko has quit IRC | 12:39 | |
*** amleczko has joined #zope3-dev | 12:39 | |
*** jsadjohnson has joined #zope3-dev | 12:42 | |
*** regebro has joined #zope3-dev | 12:44 | |
regebro | OK, so we have a buildout with a bin/test and a test, but of course the configure.zcml is not getting included in this very simple and basic test. | 12:46 |
regebro | What is the canonical way of getting the configure.zcml included? | 12:47 |
*** malthe has joined #zope3-dev | 12:47 | |
regebro | I can't get all the million ways of test setup in Zope2, Zope3 and Plone and Doctets and functional tests and unit tests into my little tiny head. | 12:49 |
regebro | I wish there was ONE way of doing this. :( | 12:50 |
*** dunny has quit IRC | 12:55 | |
timte | regebro: I don't know if all have, but some packages in svn.zope.org has buildouts for testing them, those should be good examples | 12:59 |
regebro | timte: Good idea, I'll check that. | 12:59 |
afd_ | amleczko: you could look at lovely.remotetask or zc.async as "co-processors" for zope | 13:01 |
*** charith_para has quit IRC | 13:01 | |
*** jpcw2002 has quit IRC | 13:03 | |
amleczko | afd_: i'm looking :) | 13:03 |
regebro | If the test requires ZCML, is it the normally seen as a functional test? Even if no external modules are involved? | 13:05 |
regebro | timte: Can't find anything of interest. | 13:08 |
*** yvl has left #zope3-dev | 13:10 | |
timte | regebro: for instance the FunctionalDocFileSuite test class probably loads configure.zcml | 13:18 |
timte | regebro: do you have _the_ zope book? :) | 13:19 |
regebro | Yeaaah, but this isn't functional. :-) | 13:19 |
regebro | IMO. | 13:19 |
regebro | I have Phillips books, which isn't helping in this case. | 13:19 |
regebro | And it's not the newest version either. | 13:19 |
* regebro is ashamed | 13:19 | |
timte | I don't think unit tests ever load zcml, then they are not unit tests | 13:20 |
timte | then you have functional and integrational tests | 13:21 |
regebro | timte: OK, I suspected that. | 13:21 |
regebro | That's not obvious at all, btw. :) | 13:22 |
afd_ | amleczko: another solution might be to use an external queue (NQDQ for ex -> http://code.google.com/p/microapps/wiki/NQDQ) and to have external processes use the queue then call zope with the rezult | 13:22 |
afd_ | result | 13:22 |
amleczko | afd_: i'm testing zc.async | 13:23 |
regebro | timte: But OK, we'll use the FunctionalTestLayer to test the zcml, and make a separate unit test to test the functionality of the utility. | 13:24 |
regebro | A bit silly, but if this is canon, then we do it like that. ;) | 13:25 |
timte | regebro: what's confusing is that philipp and zope has different opinions about what really is functional testing | 13:26 |
timte | regebro: it's not silly, it's called isolation :) | 13:26 |
*** MJ has quit IRC | 13:30 | |
*** MJ has joined #zope3-dev | 13:30 | |
regebro | timte: And I have a third one. :) | 13:31 |
timte | maybe what you do is integrational testing? | 13:34 |
regebro | timte: Wel, I'm doing unit testing, really. | 13:35 |
regebro | It's just that I don't see why I should register the utilities in the setup, when I already have done it in configure.zcml. :) | 13:35 |
regebro | I'm lazy. :) | 13:35 |
regebro | What's really needed is a united consistent attitude and view, and documentation, for making tests in Zope3/Zope2 and Plone. | 13:38 |
regebro | So you make a test setup the same way in all environments. | 13:39 |
*** alga has quit IRC | 13:39 | |
regebro | Just using different layers, preferrably. | 13:39 |
*** greenman has quit IRC | 13:43 | |
*** hexsprite has joined #zope3-dev | 13:47 | |
*** flox has quit IRC | 13:50 | |
*** flox has joined #zope3-dev | 13:51 | |
*** harobed has joined #zope3-dev | 13:53 | |
*** flox has quit IRC | 13:53 | |
*** flox has joined #zope3-dev | 13:53 | |
*** MJ is now known as MJ|lunch | 13:55 | |
*** sorindregan has quit IRC | 13:56 | |
*** dirceu has joined #zope3-dev | 13:57 | |
*** dobee has joined #zope3-dev | 14:02 | |
regebro | Any hints on getting all registered interfaces from the component registry? | 14:08 |
regebro | :) | 14:08 |
regebro | It's "Do our job for free week"! :) | 14:09 |
*** markusleist has joined #zope3-dev | 14:13 | |
Theuni | ? | 14:16 |
*** amleczko has quit IRC | 14:20 | |
*** MJ|lunch is now known as MJ | 14:22 | |
*** dobee has quit IRC | 14:23 | |
regebro | Theuni: My GSoC is here and he is working on a component registry introspector. | 14:24 |
regebro | We did find how to get all interfaces registered btw. | 14:24 |
Theuni | ah | 14:24 |
Theuni | who are you mentoring? | 14:24 |
Theuni | timte? | 14:24 |
Theuni | are do you mean "here" as in at your place? | 14:25 |
regebro | No, Martin Lundwall. And yes.:) | 14:26 |
*** dirceu has quit IRC | 14:28 | |
Theuni | heh | 14:29 |
*** benji has joined #zope3-dev | 14:45 | |
*** faassen has joined #zope3-dev | 14:47 | |
*** stub has quit IRC | 14:48 | |
*** amleczko has joined #zope3-dev | 14:58 | |
*** whit has joined #zope3-dev | 15:01 | |
*** afd_ has quit IRC | 15:05 | |
*** mgedmin has joined #zope3-dev | 15:05 | |
*** alga has joined #zope3-dev | 15:27 | |
*** ignas has joined #zope3-dev | 15:35 | |
*** kursor has quit IRC | 15:43 | |
*** J1m has joined #zope3-dev | 15:44 | |
*** srichter has quit IRC | 15:46 | |
*** lurkymclurkleton has joined #zope3-dev | 15:57 | |
*** jamur2 has joined #zope3-dev | 15:57 | |
*** povbot has joined #zope3-dev | 16:10 | |
*** lucielejard has joined #zope3-dev | 16:13 | |
*** malthe_ has joined #zope3-dev | 16:40 | |
*** reco has joined #zope3-dev | 16:43 | |
*** whit has quit IRC | 16:49 | |
*** malthe has quit IRC | 16:51 | |
*** sorindregan has joined #zope3-dev | 16:54 | |
*** flox has quit IRC | 16:54 | |
*** harobed has quit IRC | 16:54 | |
*** amleczko has quit IRC | 16:54 | |
*** tdoggette has joined #zope3-dev | 17:05 | |
*** mattt_ has joined #zope3-dev | 17:05 | |
*** jluisn has joined #zope3-dev | 17:05 | |
*** TheVision has joined #zope3-dev | 17:10 | |
*** TheVision has left #zope3-dev | 17:11 | |
*** TheVision has joined #zope3-dev | 17:13 | |
*** malthe_ is now known as malthe | 17:14 | |
*** kursor has joined #zope3-dev | 17:23 | |
*** charith_para has joined #zope3-dev | 17:23 | |
mattt_ | So, Zope 3 doesn't require any kind of 'server install', it's just a series of eggs/classes that are loaded by a python script? | 17:23 |
mattt_ | ie: the '-ctl' script? | 17:23 |
timte | mattt_: the ctl script starts a server | 17:26 |
*** charith_para has left #zope3-dev | 17:26 | |
timte | mattt_: zope3 comes with a server, you don't need to install an external one, if that's what you mean | 17:26 |
mattt_ | right, but the server is defined in a buildout by the eggs included and some configuration data? | 17:26 |
timte | something like that | 17:26 |
ignas | it can work that way | 17:26 |
mattt_ | couldn't setup.py just be xml or zcml? | 17:30 |
*** nathany has joined #zope3-dev | 17:33 | |
Theuni | benji: ping | 17:34 |
*** vimes6 has joined #zope3-dev | 17:34 | |
*** vimes6 has left #zope3-dev | 17:34 | |
*** srichter has joined #zope3-dev | 17:35 | |
*** MJ has quit IRC | 17:39 | |
*** ChanServ sets mode: +o srichter | 17:40 | |
*** whitmo has joined #zope3-dev | 17:45 | |
*** rmarianski has joined #zope3-dev | 17:45 | |
*** timte has quit IRC | 17:46 | |
*** whitmo is now known as whit | 17:50 | |
* jluisn is away: Saindo por enquanto. | 17:53 | |
*** menesis has quit IRC | 17:53 | |
*** sorindregan has quit IRC | 17:54 | |
benji | Theuni: pong | 17:57 |
*** salfield has joined #zope3-dev | 18:00 | |
Theuni | benji: I wondered how you made those subsequent 0.3 releases of zc.sf without an 0.3 maintenance branch so i opted to create one now | 18:02 |
*** projekt01 has quit IRC | 18:02 | |
benji | k | 18:03 |
*** jamur2 has quit IRC | 18:03 | |
*** markusleist has quit IRC | 18:03 | |
*** deo has quit IRC | 18:03 | |
*** jfroche has quit IRC | 18:03 | |
benji | IIRC, there had been no changes to the trunk since the previous release, so I just tagged the trunk | 18:04 |
Theuni | k. i derived it from your last tag | 18:04 |
*** jamur2 has joined #zope3-dev | 18:05 | |
*** markusleist has joined #zope3-dev | 18:05 | |
*** deo has joined #zope3-dev | 18:05 | |
*** jfroche has joined #zope3-dev | 18:05 | |
Theuni | actually I guess that we should start calling it 1.0 at some point | 18:05 |
Theuni | there really isn't anything missing feature-wise | 18:05 |
*** ccomb has joined #zope3-dev | 18:09 | |
benji | +1 | 18:12 |
*** acsr has quit IRC | 18:12 | |
Theuni | k | 18:13 |
Theuni | i'll do that when i have some time | 18:13 |
*** vimes656 has quit IRC | 18:13 | |
mattt_ | Is there any mechanism for remote-including html files in a Zope 3 template? A third-party package, perhaps? | 18:16 |
*** jukart has quit IRC | 18:17 | |
ignas | remote-including? | 18:18 |
mattt_ | like the apache <!--#include ...--> directive | 18:18 |
ignas | don't think so, though if I had to do it - i'd do it as WSGI middleware rather than as something in Zope | 18:19 |
mattt_ | So, create some WSGI app that I could use in Zope? | 18:20 |
ignas | ok, maybe not, i am not sure what problem you are solving | 18:20 |
ignas | it seems that you just don't want to rewrite some legacy content as ZPT's and want to use them as they are? | 18:21 |
mattt_ | ignas: I've been provided with a set of templates designed for a typical LAMP environment. Because they're processed by Apache they can use <!--#include .../foo.html --> to include some remote html before the document is sent to the user. | 18:21 |
ignas | hmm | 18:22 |
mattt_ | If I can't do that, I'll have to update my templates if there are any updates to those remotely included fiels | 18:22 |
ignas | if you are using buildout and paste | 18:22 |
mattt_ | which is the purpose of the remotely included files - they have some content that is managed centrally | 18:22 |
ignas | then - write a wsgi middleware that can process the include tag | 18:22 |
*** reco has quit IRC | 18:22 | |
ignas | and add it in the paste.ini | 18:23 |
mattt_ | so have my templates updated when I run buildout? | 18:23 |
ignas | no | 18:23 |
*** jayaraj has quit IRC | 18:23 | |
*** flox has joined #zope3-dev | 18:23 | |
ignas | create code that does the same "work" apache did | 18:23 |
ignas | yourself | 18:23 |
ignas | and add it to paste.ini | 18:23 |
ignas | as middleware | 18:23 |
ignas | at least - that's the simplest way to make it work | 18:24 |
*** baijum has joined #zope3-dev | 18:24 | |
ignas | imho | 18:24 |
ignas | i am often wrong ;) | 18:24 |
mattt_ | seems like a reasonable solution ^_^ I'm just not entirely familiar with paste and WSGI :) | 18:25 |
ignas | http://pythonpaste.org/ | 18:25 |
ignas | might be useful then | 18:25 |
*** alecghica has quit IRC | 18:26 | |
*** baijum has quit IRC | 18:27 | |
ignas | Paste egg has some examples of a middleware | 18:27 |
ignas | like "Paste-1.6-py2.4.egg/paste/pony.py" | 18:27 |
*** malthe has quit IRC | 18:28 | |
mattt_ | cool, thanks | 18:28 |
ignas | another solution would be to use mod-wsgi compiled for python2.4 which would probably allow apache to do it's thing | 18:30 |
ignas | but for that you must feel confident in your ability to compile an apache module | 18:30 |
ignas | install it and configure it | 18:30 |
junkafarian | hey, is there a way for a container to parse the rest of the url without relying on the NotFound exception? | 18:31 |
ignas | junkafarian: containers do not parse urls | 18:31 |
junkafarian | sorry | 18:31 |
junkafarian | i meant use the traversal logic | 18:31 |
ignas | what are you trying to do? | 18:32 |
junkafarian | to recognise when a specific container has been called and pass the rest of the url as args or somesuch | 18:32 |
junkafarian | its for a gallery | 18:32 |
ignas | and? | 18:33 |
junkafarian | and is basically going to use cataloged categories to filter content | 18:33 |
junkafarian | so i want to have urls like: path/to/gallery/category | 18:33 |
ignas | so why don't you write a custom traverser for that container? | 18:33 |
ignas | that would do category lookup | 18:33 |
ignas | instead of doing item lookup ? | 18:34 |
junkafarian | thats what i want | 18:34 |
junkafarian | :D | 18:34 |
junkafarian | wheres the best place to read up on that? | 18:34 |
*** acsr has joined #zope3-dev | 18:34 | |
ignas | no idea, i just look at my old code for that | 18:35 |
ignas | lisppaste6: url | 18:35 |
lisppaste6 | To use the lisppaste bot, visit http://paste.lisp.org/new/zope3-dev and enter your paste. | 18:35 |
junkafarian | or just the location in the zope codebase? | 18:35 |
lisppaste6 | ignas pasted "Custom traverser registration" at http://paste.lisp.org/display/62034 | 18:36 |
ignas | the zcml looks like that | 18:36 |
ignas | just take care to register it only for your gallery container | 18:36 |
ignas | and make the custom traverser implement the IWhateverPublisher interface | 18:36 |
ignas | it's "zope:view" in there | 18:37 |
ignas | though i guess simple adapter registration would work too | 18:37 |
junkafarian | IWhateverPublisher eg: IHTTPPublisher? | 18:37 |
ignas | as for type - IBrowserRequest or some kind of layer is more suitable too | 18:37 |
ignas | yeah | 18:37 |
ignas | zope.app.http-3.4.1-py2.4.egg/zope/app/http/traversal.py has some examples | 18:38 |
ignas | maybe not very good, but still something | 18:39 |
*** jayaraj has joined #zope3-dev | 18:39 | |
ignas | zope.app.container-3.5.3-py2.4-linux-i686.egg/zope/app/container/traversal.py - are better | 18:39 |
ignas | because they have the code that deals with view lookup | 18:39 |
ignas | if the category/item is not found | 18:39 |
ignas | junkafarian: and take care to handle items with same names as categories, if you will try traversing to both - container and categories in the same traversal step | 18:40 |
ignas | like gallery/image.jpg and gallery/fish/image.jpg both being valid | 18:40 |
ignas | you can get inaccessible images if someone will upload an image called "fish" | 18:40 |
*** tdoggette has quit IRC | 18:40 | |
junkafarian | im planning on blocking it all out of that skin | 18:41 |
junkafarian | so its all done through the traverser | 18:41 |
ignas | blocking what out? | 18:41 |
mattt_ | Is there some basic infrastructure available to determine which language to display the site in? | 18:42 |
junkafarian | direct access to the objects | 18:42 |
ignas | mattt_: yes | 18:42 |
junkafarian | as all the data will be gathered server side | 18:42 |
*** reco has joined #zope3-dev | 18:42 | |
ignas | junkafarian: I was talking about your traverser implementation | 18:42 |
junkafarian | so was i :P | 18:43 |
ignas | you don't need to block anything in there | 18:43 |
junkafarian | basically using the traverser to block direct access to the contained objects | 18:43 |
ignas | well - it's more like - not giving not "blocking" | 18:44 |
junkafarian | there is that | 18:44 |
*** jayaraj has quit IRC | 18:44 | |
ignas | if the code to do that is absent - i wouldn't call it "blocking" ;) | 18:44 |
junkafarian | just a lack of providing :P | 18:44 |
ignas | so yeah, in that case - just fire NotFound error if there is no such category, and there is no view with that name | 18:45 |
mattt_ | ignas: where can I find it? | 18:45 |
junkafarian | yeah | 18:45 |
ignas | mattt_: hmm, it's all around you, i mean - just use MessageFactory where you have to, and i18n:translate="" | 18:46 |
ignas | or do you want some direct way to find out which language the page is in | 18:46 |
mattt_ | ignas: I want to find out which language the user is requesting | 18:46 |
ignas | requesting? | 18:47 |
ignas | hmm, in schooltool we had it in config file + reacting to browser configuration, then i had to add links to allow users to switch languages | 18:47 |
mattt_ | well, does the user want some page in french or english, for example. So I can do things in my template like set the correct "lang" attribute on a tag | 18:47 |
ignas | storing the state in the session | 18:47 |
ignas | lang attribute on a tag? | 18:48 |
*** binseer has quit IRC | 18:48 | |
mattt_ | sure, like the <html> tag - I'd want something like <html tal:attributes="lang view/language"> | 18:49 |
mattt_ | I need to know if the user is requesting the page in 'en' or 'fr' | 18:49 |
mattt_ | If I have an internationalized site, how does Zope know which language to publish in? | 18:50 |
mattt_ | zope.session? | 18:50 |
ignas | well - automatically | 18:50 |
ignas | there is a utility | 18:51 |
ignas | that determines that information | 18:51 |
ignas | from - configuration and browser settings | 18:51 |
ignas | and then the rest of the zope does the right thing if you did the right thing ;) | 18:51 |
ignas | upl = IUserPreferredLanguages(self.request) | 18:51 |
ignas | return upl.getSelectedLanguage() | 18:51 |
ignas | is the code to get the language if you want to do something about it yourself | 18:51 |
mattt_ | ah, cool, thanks | 18:52 |
ignas | but in schooltool it's only used to "mark" the right flag | 18:52 |
ignas | in the selector | 18:52 |
ignas | the actual - pick the right text for "Hello" is done by Zope | 18:52 |
*** vimes656 has joined #zope3-dev | 18:54 | |
*** rmarians1i has joined #zope3-dev | 19:07 | |
*** reco has quit IRC | 19:08 | |
*** reco has joined #zope3-dev | 19:09 | |
*** faassen has quit IRC | 19:13 | |
*** vimes656_ has joined #zope3-dev | 19:17 | |
*** MJ has joined #zope3-dev | 19:21 | |
*** thruflo has quit IRC | 19:21 | |
*** seletz has left #zope3-dev | 19:22 | |
*** agroszer has quit IRC | 19:28 | |
*** jodok has quit IRC | 19:29 | |
*** srichter has quit IRC | 19:31 | |
*** srichter has joined #zope3-dev | 19:35 | |
*** vimes656 has quit IRC | 19:36 | |
*** rmarianski has quit IRC | 19:36 | |
*** rmarians1i is now known as rmarianski | 19:36 | |
mgedmin | uh, oh | 19:40 |
mgedmin | resources referring to other resources is a tricky thing | 19:40 |
*** jpcw2002 has joined #zope3-dev | 19:41 | |
*** srichter has quit IRC | 19:42 | |
*** mkerrin has quit IRC | 19:42 | |
*** srichter has joined #zope3-dev | 19:42 | |
*** tarek has quit IRC | 19:45 | |
*** MJ has quit IRC | 19:46 | |
*** gberdyshev has joined #zope3-dev | 19:49 | |
*** tarek has joined #zope3-dev | 19:50 | |
*** quodt has quit IRC | 19:55 | |
*** jsadjohnson has left #zope3-dev | 19:55 | |
*** rmarianski has quit IRC | 19:55 | |
*** rmarianski has joined #zope3-dev | 19:58 | |
*** TheVision has left #zope3-dev | 20:08 | |
junkafarian | ignas: still there? | 20:10 |
ignas | junkafarian: yes | 20:10 |
junkafarian | hey | 20:10 |
junkafarian | what should i return instead of the contained object in the publishTraverse method? | 20:10 |
junkafarian | can i not just render a page template from it? | 20:11 |
ignas | lisppaste6: url | 20:11 |
lisppaste6 | To use the lisppaste bot, visit http://paste.lisp.org/new/zope3-dev and enter your paste. | 20:11 |
ignas | post your traverser there | 20:11 |
ignas | so I would know what you are talking about | 20:11 |
lisppaste6 | junkafarian pasted "custom traverser" at http://paste.lisp.org/display/62041 | 20:13 |
junkafarian | would you like the zcml too? | 20:13 |
junkafarian | publishTraverse gets called | 20:13 |
junkafarian | but it seems to continue traversing | 20:13 |
ignas | emm | 20:14 |
junkafarian | and ends in a NotFound exception | 20:14 |
ignas | traversers do not render | 20:14 |
ignas | they return objects | 20:14 |
ignas | that are then shown | 20:14 |
ignas | from what I can recall | 20:14 |
junkafarian | so should i just return self.context? | 20:14 |
ignas | oh, yeah, double traversal is tricky | 20:14 |
ignas | what I do most of the time is - store the state | 20:14 |
ignas | like "traversed into category 'foo'" | 20:15 |
ignas | and return self | 20:15 |
ignas | or | 20:15 |
ignas | return a "proxy" category object | 20:15 |
ignas | that acts as a container | 20:15 |
ignas | that contains the images | 20:15 |
* ignas prefers the second approach | 20:15 | |
ignas | used the first one when doing some crazy stuff, like traversing into dates wiritten like 2007/01/15 | 20:16 |
mattt_ | What's the difference between a BrowserPage and a BrowserView ^_^ | 20:16 |
ignas | don't ask me ;) | 20:16 |
ignas | junkafarian: so what you want your traverser to return is a "Category" that has __parent__ set to the gallery object | 20:17 |
*** vimes656_ has quit IRC | 20:17 | |
ignas | it does not have to be persistent | 20:17 |
ignas | just has to have __name__ set to it's id and __parent__ | 20:17 |
*** maurits has quit IRC | 20:17 | |
ignas | and then you either inherit from Container and implement the container bits | 20:17 |
junkafarian | will it require an interface? | 20:17 |
junkafarian | ok | 20:17 |
ignas | or implement a custom traverser for your category | 20:17 |
*** RaFromBRC has joined #zope3-dev | 20:17 | |
*** vimes656 has joined #zope3-dev | 20:18 | |
junkafarian | and how would i render the content from the Category object? | 20:18 |
ignas | well - Category traverser returns the image | 20:18 |
ignas | how will the url for some image in there look like? | 20:19 |
*** kursor has quit IRC | 20:19 | |
junkafarian | its actually only going to be ...gallery/category and no deeper | 20:19 |
ignas | so the category will show what? | 20:20 |
ignas | and html page? | 20:20 |
junkafarian | yeah | 20:20 |
junkafarian | with a list of objects | 20:20 |
ignas | and in that html page | 20:20 |
ignas | what do you have? | 20:20 |
ignas | <img > tags? | 20:20 |
junkafarian | its actually a gallery....of links :P | 20:21 |
ignas | oh, img tags will be pointing to images stored somewhere on the filesystem or even on another server... yes? | 20:21 |
junkafarian | so no img tags | 20:21 |
ignas | ok, links | 20:21 |
junkafarian | or if there are img tags then ^^yes | 20:21 |
ignas | so there are no actual images in your ZODB | 20:21 |
ignas | only links to them ? | 20:21 |
junkafarian | hell no :P | 20:21 |
junkafarian | i hate storing multimedia in databases | 20:21 |
junkafarian | yes | 20:21 |
ignas | ok, so you don't need a traverser for category | 20:21 |
ignas | you want a "view" for your category object | 20:22 |
junkafarian | ok | 20:22 |
ignas | registered for "index.html" | 20:22 |
ignas | and you want to return that category object when someone tries traversing into your gallery | 20:22 |
*** sp0cksbeard has joined #zope3-dev | 20:22 | |
junkafarian | essentially yes | 20:22 |
junkafarian | it would be great if i could just pass the remaining url to the container object | 20:23 |
ignas | what container object? | 20:24 |
ignas | what remaining url? if you only have "gallery/category/" | 20:24 |
ignas | and no deeper | 20:24 |
junkafarian | eg: pass /category to gallery | 20:25 |
ignas | well - you can do that in your traverser, i mean - all the traverser can see is "category" | 20:25 |
junkafarian | as a string or list | 20:25 |
ignas | what do you mean "pass" | 20:25 |
junkafarian | so return the gallery object with 'category' as an arg or somesuch | 20:26 |
ignas | well - don't do that, you don't want traversers modifying or setting state to persistent objects | 20:26 |
junkafarian | right ok | 20:27 |
junkafarian | so best solution is? | 20:27 |
ignas | add a class Category | 20:27 |
ignas | add a method to your Gallery that is called | 20:27 |
ignas | getCategory() | 20:27 |
ignas | that returns either error or none or a Category object for that string | 20:28 |
ignas | and use that method in your traverser | 20:28 |
ignas | or do whatever you like | 20:28 |
ignas | i mean - it's your code | 20:28 |
junkafarian | how do i call it from the traverser? | 20:28 |
*** fcorrea has joined #zope3-dev | 20:28 | |
ignas | hmm, cat = self.context.getCategory("name") | 20:29 |
junkafarian | then return cat? | 20:30 |
ignas | if cat: return cat else: return queryMultiAdapter(get the view) | 20:30 |
junkafarian | nice | 20:30 |
ignas | unless you don't want views on your gallery to work | 20:30 |
ignas | and WTF you are doing there with get_url | 20:30 |
junkafarian | hah | 20:31 |
ignas | if you want the name of the category - it's the "name" parameter | 20:31 |
junkafarian | sorry, copied it over from another class which someone else wrote :) | 20:32 |
*** TheVision has joined #zope3-dev | 20:32 | |
junkafarian | i used name in publishTraverse | 20:32 |
ignas | and - traversers do not render, they either return the View or the object and raise NotFound in other cases | 20:33 |
junkafarian | ok | 20:33 |
*** jluisn has left #zope3-dev | 20:33 | |
* junkafarian hasnt used traversers before | 20:33 | |
TheVision | Hello. I was hoping there may be someone around that may be able to help out with zc.sourcerelease issue??? :-) | 20:34 |
ignas | TheVision: just state the question | 20:35 |
*** charith_para has joined #zope3-dev | 20:35 | |
aclark | TheVision: as they say in #plone, "Don't ask to ask just ask." :-) | 20:35 |
TheVision | ha thanks.. pasting code in clean area.. hold on.. | 20:37 |
junkafarian | ignas: cheers for all your help btw :) | 20:42 |
ignas | junkafarian: you're welcome | 20:42 |
TheVision | OK.... http://paste.plone.org/21898 | 20:43 |
TheVision | the packager goes through my buildout.cfg.. everything appears to be going great but when it gets to the last "part" .. which is itself.. it dies with the pasted error.. | 20:44 |
*** norro_ has joined #zope3-dev | 20:44 | |
ignas | well - you're in trouble | 20:44 |
ignas | you are using system python | 20:44 |
ignas | and it has PIL installed already | 20:45 |
ignas | so packaging machinery get's confused about it | 20:45 |
TheVision | So i need to local python and PIL ? | 20:45 |
ignas | PILwoTk i'd guess | 20:45 |
ignas | as for local python | 20:45 |
ignas | i have managed to get it working once, but the thing was not foolproof | 20:46 |
ignas | get sourcerelease | 20:46 |
ignas | working | 20:46 |
ignas | sourcerelease, the last time i tried it | 20:46 |
ignas | had problems with including eggs that are not in your eggs cache | 20:46 |
ignas | and you don't get eggs in eggs cache if you have them installed in your python, even if it's local | 20:46 |
TheVision | i got it working once as well.. but it was a couple months ago.. haven't changed my usage of python or anything since then | 20:47 |
ignas | so local will solve PIL problem probably | 20:47 |
ignas | or just plainly - try uninstalling PIL ;) | 20:47 |
TheVision | ok, maybe here is a smarter question... I need to release a buildout to a staging machine that is completely offline due to network.. obvisouly this product seems ideal but is there any other possible option to use? | 20:48 |
ignas | nope, don't think so, this thing seems perfect (unless that machine is 64 bit and your machine is 32 bit ) | 20:48 |
ignas | :) | 20:48 |
TheVision | my sys admin would install python, PIL, etc. like this machine.. | 20:48 |
ignas | you see - PIL is an egg | 20:48 |
TheVision | they are same | 20:48 |
ignas | and sourcerelease is failing | 20:48 |
ignas | because it tries copyying PIL | 20:48 |
ignas | from your site-packages to your eggs | 20:49 |
ignas | at least that's my guess | 20:49 |
TheVision | PIL is evil.. | 20:49 |
ignas | actually - it's your linux distribution vs easy_install vs buildout | 20:49 |
TheVision | yeah | 20:49 |
TheVision | i believe we easy installed that.. | 20:49 |
ignas | so - uninstall PIL | 20:50 |
ignas | optionally - change the dependency to PILwoTK (to make it easier to build) and set your find_links to find that | 20:50 |
TheVision | i'll get PIL unsinstalled.. is there directions on how to add that to buildout? | 20:50 |
ignas | at least we are using that, so building of PIL would not depend on TK | 20:50 |
ignas | well - your setup.py | 20:51 |
ignas | should have "PIL" in there | 20:51 |
ignas | i'd guess | 20:51 |
ignas | not sure if there is a real PIL egg | 20:51 |
ignas | i definitely know there is PILwoTk somewhere in zope repositories | 20:51 |
ignas | in here http://download.zope.org/distribution/ | 20:52 |
ignas | http://download.zope.org/distribution/PILwoTk-1.1.6.4.tar.gz for example | 20:52 |
ignas | I have that egg in my own server | 20:53 |
ignas | so i would not get all the unstable eggs from there | 20:53 |
ignas | when setting find_links | 20:53 |
ignas | but do this at your own risk ;) | 20:53 |
TheVision | i guess i'm unsure as to what i need to add to buildout to include PILwoTk | 20:54 |
ignas | it's "Works on my machine" certified ;) | 20:54 |
ignas | find some section with "eggs =" | 20:54 |
ignas | add find_links = path_to_where pil is | 20:54 |
TheVision | my find links uses zope..distribution already so thats good | 20:54 |
benji | ignas: darn, worksforme.com is taken | 20:54 |
ignas | and add PILwoTk ot the list of eggs | 20:54 |
TheVision | and uninstall PIL and boom that should work? | 20:55 |
ignas | well - that worked for me ;) | 20:55 |
ignas | actually - i am not using system python even | 20:55 |
ignas | I am doing a one of a kind hack to bootstrap a virtual python and buildout in my sandbox | 20:56 |
TheVision | yeah i don't want to mess with virtual python | 20:56 |
ignas | then using virtualpython recipe to do that in the sourcerelease | 20:56 |
TheVision | i have eggs = elementtree | 20:56 |
ignas | then in the next line add | 20:56 |
*** mattt_ has left #zope3-dev | 20:56 | |
ignas | " PILwoTk" | 20:57 |
ignas | or is it PILwoTK | 20:57 |
benji | PILwoTk | 20:57 |
TheVision | looks like lowercase.. | 20:57 |
TheVision | if i just added locally.. will system use locally.. so maybe I don't need to bother sys admin to uninstall? | 20:57 |
TheVision | guess I can find out.. ha | 20:58 |
*** charith_para has left #zope3-dev | 20:58 | |
TheVision | (trying new source release with local PIL fully installed, package came down no problem) | 21:01 |
TheVision | **fingers crossed** | 21:01 |
ignas | :) | 21:01 |
*** vimes656 has quit IRC | 21:02 | |
ignas | if only I had the time (cared enough) to fix the bug that is bothering me in sourcerelease :/ | 21:02 |
TheVision | nope didn't work.. looks like same error | 21:03 |
*** vimes656 has joined #zope3-dev | 21:03 | |
TheVision | is it this bug or something else that is known? | 21:03 |
ignas | TheVision: did you see the PILwoTk egg getting installed? | 21:03 |
ignas | TheVision: it's a different bug | 21:04 |
TheVision | yup.. it came down no problems.. saw output of PIL Build Summary, etc.. | 21:04 |
ignas | hmm, really the same error? | 21:04 |
ignas | site-packages one? | 21:04 |
TheVision | yeah | 21:04 |
ignas | so PIL is still in site-packages | 21:05 |
ignas | which was the cause of your problems ... | 21:05 |
ignas | at least I think | 21:05 |
ignas | i might be wrong though | 21:05 |
TheVision | i just wish it was smart enough to use local PIL.. there are other people using this dev box so I can't just wipe system PIL without having everyone update to local PIL, etc.. | 21:06 |
ignas | well - i'd use virtual python, but i would not suggest it ;) | 21:07 |
TheVision | in this IRC log with wiggy trying this... | 21:07 |
TheVision | http://zope3.pov.lt/irclogs/%23zope3-dev.2008-03-17.log.html | 21:07 |
TheVision | mid-way down.. | 21:07 |
ignas | yeah - it's the bug | 21:08 |
ignas | that i want fixed | 21:08 |
TheVision | oh | 21:08 |
*** bigkevmcd has quit IRC | 21:08 | |
TheVision | seems similar to my problem | 21:08 |
TheVision | but he got it working. | 21:08 |
*** junkafarian has quit IRC | 21:09 | |
ignas | well - he is using virtualenv | 21:09 |
ignas | and encountering the same problem | 21:09 |
ignas | some eggs in stie packages | 21:09 |
TheVision | oh yeah.. now i see that | 21:09 |
ignas | are excluded from the tarball | 21:09 |
ignas | which is solved by | 21:09 |
ignas | installing zc.sourcerelease in a buildout | 21:09 |
TheVision | which i did | 21:10 |
TheVision | as he directed me to | 21:10 |
ignas | in a buildout that is using virtualpython | 21:10 |
ignas | or a clean python | 21:10 |
ignas | your site-packages have to be empty | 21:10 |
ignas | for that to work i *think* | 21:10 |
ignas | but now I know how to update my sourcerelease tutorial | 21:10 |
ignas | even though I don't like it | 21:10 |
*** mattt_ has joined #zope3-dev | 21:11 | |
TheVision | no offense.. i found current documentation very confusing | 21:11 |
TheVision | i've tried doing build via svn but it can't handle https:// | 21:11 |
mattt_ | Are there any wysiwyg editors with Zope 3 integration? | 21:11 |
ignas | mattt_: zope.html | 21:12 |
ignas | has FCK editor widget | 21:12 |
mattt_ | oh great, thanks | 21:12 |
ignas | TheVision: i have no idea what's the current documentation ;) | 21:12 |
ignas | TheVision: i am doing the writeup for myself ;) | 21:12 |
TheVision | ignas: well you should make it public.. haha | 21:13 |
ignas | http://betterwheel.wordpress.com/2008/02/05/how-to-package-a-zope3-application-tarball-in-3-easy-steps/ is the writeup, but it's *wrong*, as it is using easy_install to install zopeproject and zc.sourcerelease, while it should do a buildout for each | 21:14 |
ignas | i might update it | 21:14 |
TheVision | maybe i should try virtual python | 21:14 |
ignas | and it is very *me* centric | 21:14 |
ignas | as in - it reflects all the fears and issues i have had with this stuff ;)( | 21:15 |
ignas | like - "never require users to have root" and "never ask users to compile python" | 21:15 |
ignas | and "no one has buildout installed on their machine" | 21:15 |
TheVision | ha | 21:15 |
*** vimes656 has quit IRC | 21:17 | |
ignas | sourcerelease will work only if the only thing you have in your site-packages is buildout | 21:18 |
ignas | from what *I* understand | 21:18 |
ignas | going home, bye | 21:19 |
TheVision | thanks for your help | 21:19 |
ignas | thanks for the link to irc logs | 21:19 |
*** ignas has quit IRC | 21:19 | |
*** whit has quit IRC | 21:23 | |
*** gberdyshev_ has joined #zope3-dev | 21:28 | |
*** sparcd has joined #zope3-dev | 21:28 | |
sparcd | I have a form that is being generated using formlib based on schema from interface IMyInterface. In a totally seperate product I'd like to extend the fields in IMyInterface with schema from IMyNewInterface, anyone got any pointers? | 21:30 |
*** tarek has quit IRC | 21:34 | |
*** aclark is now known as aclark|away | 21:36 | |
*** jpcw2002 has quit IRC | 21:36 | |
*** gberdyshev has quit IRC | 21:43 | |
*** markusleist has quit IRC | 21:43 | |
*** tarek has joined #zope3-dev | 21:52 | |
hazmat | sparcd, make a new form | 21:53 |
sparcd | hazmat: and subclass the functionality from the existing form? | 21:53 |
*** mgedmin has quit IRC | 21:54 | |
hazmat | sure.. and just set up the form fields as you want with your new interface | 21:54 |
sparcd | hazmat: will give that a try... | 21:54 |
*** afd_ has joined #zope3-dev | 21:56 | |
*** tarek has quit IRC | 22:22 | |
*** tarek has joined #zope3-dev | 22:25 | |
*** hazmat has quit IRC | 22:30 | |
*** whit has joined #zope3-dev | 22:33 | |
*** sparcd has left #zope3-dev | 22:35 | |
*** greenman has joined #zope3-dev | 22:37 | |
*** ARiKA-2 has joined #Zope3-Dev | 22:46 | |
mattt_ | Is there some way to create a content class with a field that can contain multiple instances of some other object? I don't want a folder, just a field in an object which can contain objects. | 22:47 |
mattt_ | multiple instances of some other class.. :) | 22:47 |
mattt_ | For example, a vocabulary with translatable terms. | 22:48 |
ARiKA-2 | Zope 3 has no way to run with Python 2.5? lol | 22:49 |
*** greenman has quit IRC | 22:51 | |
*** dunny has joined #zope3-dev | 22:54 | |
*** yota has joined #zope3-dev | 23:04 | |
*** aclark|away is now known as aclark | 23:05 | |
*** norro_ has quit IRC | 23:07 | |
*** mgedmin has joined #zope3-dev | 23:08 | |
*** afd_ has quit IRC | 23:14 | |
*** RaFromBRC is now known as RaFromBRC|lunch | 23:15 | |
*** alga has quit IRC | 23:20 | |
*** philiKON has joined #zope3-dev | 23:47 | |
*** malthe has joined #zope3-dev | 23:50 | |
*** regebro has quit IRC | 23:50 | |
*** TheVision has quit IRC | 23:51 | |
*** harobed has joined #zope3-dev | 23:52 | |
*** greenman has joined #zope3-dev | 23:54 | |
*** RaFromBRC|lunch is now known as RaFromBRC | 23:54 |
Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!