yielder | i have a folder with 10000 objects. Any hints on how to effectively get a list of the 10 newest objects in this folder? | 00:06 |
---|---|---|
yielder | hmm, I guess i could index them and query a catalog instead of doing stuff with myfolder.items().. | 00:09 |
*** tarek_ has quit IRC | 00:20 | |
*** srichter has quit IRC | 00:37 | |
*** edgordon_ has joined #zope3-dev | 00:37 | |
*** b52laptop has quit IRC | 00:40 | |
*** b52laptop has joined #zope3-dev | 00:40 | |
*** jsadjohnson has quit IRC | 00:52 | |
*** norro has quit IRC | 00:54 | |
ccomb | yielder, you could maintain a utility which remembers the 10 newest object, and which is updated by a subscriber when an object is added. → no query, no list parsing | 01:04 |
*** natea|away has joined #zope3-dev | 01:04 | |
yielder | ccomb: ah, cool :) | 01:07 |
*** natea has quit IRC | 01:11 | |
*** rocky|away has quit IRC | 01:14 | |
*** timte has quit IRC | 01:18 | |
*** harobed has quit IRC | 01:18 | |
*** Ariel_Calzada has quit IRC | 01:22 | |
*** b0b0tiken has joined #zope3-dev | 01:23 | |
*** b0b0tiken has quit IRC | 01:30 | |
*** srichter has joined #zope3-dev | 01:30 | |
*** dunny has joined #zope3-dev | 01:35 | |
*** greenman_ has joined #zope3-dev | 02:08 | |
*** redir has joined #zope3-dev | 02:13 | |
*** redir has quit IRC | 02:15 | |
*** povbot has joined #zope3-dev | 02:21 | |
*** greenman has quit IRC | 02:21 | |
*** Jell-O-Fishi has joined #zope3-dev | 02:28 | |
*** greenman has joined #zope3-dev | 02:31 | |
*** zez_zez has joined #zope3-dev | 02:35 | |
*** redir has joined #zope3-dev | 02:38 | |
*** redir has quit IRC | 02:43 | |
*** greenman_ has quit IRC | 02:47 | |
*** greenman_ has joined #zope3-dev | 03:04 | |
*** greenman has quit IRC | 03:12 | |
*** Ariel_Calzada has joined #zope3-dev | 03:13 | |
*** b52laptop has quit IRC | 03:31 | |
*** sm has quit IRC | 03:40 | |
*** natea|away_ has joined #zope3-dev | 03:41 | |
*** natea|away has quit IRC | 03:48 | |
*** jsadjohnson has joined #zope3-dev | 04:05 | |
*** greenman has joined #zope3-dev | 04:06 | |
*** zez has joined #zope3-dev | 04:20 | |
*** natea|away has joined #zope3-dev | 04:22 | |
*** greenman_ has quit IRC | 04:23 | |
*** zez has quit IRC | 04:25 | |
*** redir has joined #zope3-dev | 04:28 | |
*** natea|away_ has quit IRC | 04:31 | |
*** zez_zez has quit IRC | 04:33 | |
*** redir has quit IRC | 04:49 | |
*** tjs has joined #zope3-dev | 04:53 | |
tjs | is this the complaints dept. ? :/ | 04:53 |
tjs | why does ILocation use __name__ | 04:54 |
tjs | when __name__ on a class actually means something else | 04:54 |
*** run|home has joined #zope3-dev | 05:20 | |
*** ChanServ sets mode: +o srichter | 05:27 | |
*** kleist has joined #zope3-dev | 05:34 | |
*** jsadjohnson has quit IRC | 05:38 | |
*** natea|away_ has joined #zope3-dev | 05:39 | |
*** natea|away has quit IRC | 05:46 | |
*** natea|away has joined #zope3-dev | 05:58 | |
*** natea|away_ has quit IRC | 06:06 | |
*** redir has joined #zope3-dev | 06:10 | |
*** philiKON_ has joined #zope3-dev | 06:26 | |
*** tjs has left #zope3-dev | 06:34 | |
*** philiKON has quit IRC | 06:42 | |
*** nitromaster has quit IRC | 07:01 | |
*** redir has quit IRC | 07:14 | |
*** natea|away_ has joined #zope3-dev | 07:36 | |
*** salfield has quit IRC | 07:40 | |
*** natea|away has quit IRC | 07:42 | |
*** pcardune has quit IRC | 07:52 | |
*** Jell-O-Fishi has quit IRC | 07:56 | |
*** chacha_chaudhry has joined #zope3-dev | 08:10 | |
*** natea|away has joined #zope3-dev | 08:13 | |
*** redir has joined #zope3-dev | 08:18 | |
*** natea|away_ has quit IRC | 08:20 | |
*** cursor has joined #zope3-dev | 08:36 | |
*** zagy has joined #zope3-dev | 08:38 | |
*** sorin_ has joined #zope3-dev | 08:38 | |
*** sorin_ is now known as sorindregan | 08:39 | |
*** redir has quit IRC | 08:45 | |
*** jodok has quit IRC | 08:46 | |
*** d2m has joined #zope3-dev | 08:50 | |
*** yvl has joined #zope3-dev | 09:11 | |
*** dunny has quit IRC | 09:22 | |
*** zagy has quit IRC | 09:22 | |
*** zagy has joined #zope3-dev | 09:22 | |
*** markusleist has joined #zope3-dev | 09:24 | |
*** pbugni has quit IRC | 09:33 | |
*** romanofski has joined #zope3-dev | 09:40 | |
romanofski | moin :) | 09:50 |
*** tjs has joined #zope3-dev | 10:00 | |
tjs | having an issue with some tests, I create a mockIntIds object and register it with provideUtility, then stuff in some testing objects | 10:00 |
tjs | then use unprovideUtility in the tearDown | 10:01 |
tjs | but it seems like the first one I setup gets used for all the tests | 10:01 |
*** regebro has joined #zope3-dev | 10:18 | |
*** dobee_ has joined #zope3-dev | 10:19 | |
*** timte has joined #zope3-dev | 10:29 | |
*** naro has joined #zope3-dev | 10:33 | |
*** tarek has joined #zope3-dev | 11:00 | |
*** jodok has joined #zope3-dev | 11:09 | |
*** cursor_ has joined #zope3-dev | 11:19 | |
*** junkafarian has joined #zope3-dev | 11:20 | |
*** cursor has quit IRC | 11:21 | |
*** jfroche has quit IRC | 11:24 | |
*** jfroche has joined #zope3-dev | 11:27 | |
*** ignas has joined #zope3-dev | 11:49 | |
*** greenman has quit IRC | 11:49 | |
*** ferrafox has joined #zope3-dev | 11:50 | |
*** baijum has joined #zope3-dev | 11:53 | |
*** cursor has joined #zope3-dev | 11:55 | |
*** cursor_ has quit IRC | 11:55 | |
*** richardkan has joined #zope3-dev | 12:07 | |
*** baijum has quit IRC | 12:09 | |
*** baijum has joined #zope3-dev | 12:09 | |
*** tarek has quit IRC | 12:10 | |
*** tarek has joined #zope3-dev | 12:26 | |
*** b52laptop has joined #zope3-dev | 12:36 | |
*** MJ has joined #zope3-dev | 12:38 | |
*** goschtl has joined #zope3-dev | 12:56 | |
goschtl | Hi is it possible to integrate this library in z3? http://trac.optio.webfactional.com/ | 12:57 |
*** deo has joined #zope3-dev | 12:57 | |
*** greenman has joined #zope3-dev | 13:00 | |
*** jodok has quit IRC | 13:02 | |
*** jodok has joined #zope3-dev | 13:07 | |
*** mgedmin has joined #zope3-dev | 13:12 | |
*** harobed has joined #zope3-dev | 14:03 | |
*** Newfie2007 has joined #zope3-dev | 14:22 | |
*** harobed has quit IRC | 14:33 | |
*** ferrafox_ has joined #zope3-dev | 14:40 | |
*** stub has joined #zope3-dev | 14:42 | |
*** ferrafox has quit IRC | 14:42 | |
*** projekt01 has joined #zope3-dev | 14:48 | |
*** chacha_chaudhry has quit IRC | 14:52 | |
*** ferrafox_ is now known as ferrafox | 15:03 | |
*** rocky has joined #zope3-dev | 15:03 | |
*** chacha_chaudhry has joined #zope3-dev | 15:07 | |
*** chacha_chaudhry has quit IRC | 15:12 | |
*** greenman has quit IRC | 15:17 | |
*** ghendi has joined #zope3-dev | 15:19 | |
*** dobee_ has quit IRC | 15:25 | |
*** stub has quit IRC | 15:26 | |
*** dobee_ has joined #zope3-dev | 15:28 | |
*** MJ has quit IRC | 15:29 | |
*** MJ has joined #zope3-dev | 15:30 | |
*** MJ is now known as MJ|lunch | 15:31 | |
*** dobee_ has left #zope3-dev | 15:36 | |
*** dobee_ has joined #zope3-dev | 15:36 | |
*** jsadjohnson has joined #zope3-dev | 15:57 | |
*** jukart has joined #zope3-dev | 15:58 | |
*** dobee_ has quit IRC | 15:58 | |
*** niemeyer has joined #zope3-dev | 15:59 | |
*** dobee has joined #zope3-dev | 16:00 | |
*** cursor has quit IRC | 16:00 | |
*** benji_ has joined #zope3-dev | 16:03 | |
*** Ariel_Calzada has quit IRC | 16:04 | |
*** redir has joined #zope3-dev | 16:08 | |
*** jodok has quit IRC | 16:08 | |
d2m | to add in zcml an interface to a class (like implements(Interface) does in source) i really need to have zope.app.component installed ? | 16:08 |
*** MJ|lunch is now known as MJ | 16:10 | |
*** MJ has quit IRC | 16:10 | |
*** J1m has joined #zope3-dev | 16:11 | |
*** jodok has joined #zope3-dev | 16:11 | |
*** tarek has quit IRC | 16:15 | |
*** afd_ has joined #zope3-dev | 16:21 | |
*** rcrafton has joined #zope3-dev | 16:23 | |
*** tarek has joined #zope3-dev | 16:29 | |
*** pcardune has joined #zope3-dev | 16:32 | |
*** natea|away_ has joined #zope3-dev | 16:33 | |
*** yvl has quit IRC | 16:37 | |
*** baijum has quit IRC | 16:39 | |
*** MJ has joined #zope3-dev | 16:45 | |
*** natea|away has quit IRC | 16:48 | |
*** natea|away has joined #zope3-dev | 16:52 | |
*** jsadjohnson has quit IRC | 17:01 | |
*** natea|away_ has quit IRC | 17:07 | |
*** ignas_ has joined #zope3-dev | 17:08 | |
*** ignas__ has joined #zope3-dev | 17:09 | |
*** ignas has quit IRC | 17:10 | |
*** natea|away has quit IRC | 17:15 | |
*** ignas__ is now known as ignas | 17:15 | |
*** Aiste has joined #zope3-dev | 17:20 | |
*** ignas_ has quit IRC | 17:34 | |
*** sorindregan has quit IRC | 17:38 | |
*** edgordon_ has quit IRC | 17:41 | |
*** ignas has quit IRC | 18:07 | |
*** edgordon has joined #zope3-dev | 18:07 | |
*** natea|away has joined #zope3-dev | 18:13 | |
*** natea|away has quit IRC | 18:14 | |
*** jhauser has joined #zope3-dev | 18:16 | |
*** dobee has quit IRC | 18:18 | |
*** netshade has joined #zope3-dev | 18:21 | |
*** pcardune has quit IRC | 18:30 | |
*** norro has joined #zope3-dev | 18:34 | |
*** goschtl has quit IRC | 18:36 | |
*** ghendi has quit IRC | 18:37 | |
*** alecm has joined #zope3-dev | 18:46 | |
*** dobee has joined #zope3-dev | 18:49 | |
*** timte has quit IRC | 18:56 | |
*** whit has joined #zope3-dev | 18:57 | |
*** netshade has quit IRC | 19:01 | |
*** mgedmin has quit IRC | 19:02 | |
*** jukart has quit IRC | 19:05 | |
*** mgedmin has joined #zope3-dev | 19:09 | |
*** nerdalert has joined #zope3-dev | 19:15 | |
*** cursor has joined #zope3-dev | 19:16 | |
*** gumpa has joined #zope3-dev | 19:18 | |
*** ksmith99 has joined #zope3-dev | 19:20 | |
*** MJ is now known as MJ|dinner | 19:21 | |
*** projekt01 has quit IRC | 19:22 | |
*** lisppaste6 has quit IRC | 19:34 | |
*** jukart has joined #zope3-dev | 19:36 | |
*** dobee has quit IRC | 19:43 | |
*** jodok has quit IRC | 19:43 | |
wiggy | how do you register a subscription adapter in zcml? | 19:53 |
*** sm has joined #zope3-dev | 19:53 | |
*** pcardune has joined #zope3-dev | 19:53 | |
*** jukart has quit IRC | 19:54 | |
*** alecm_ has joined #zope3-dev | 19:56 | |
*** ferrafox has quit IRC | 19:57 | |
*** pbugni has joined #zope3-dev | 19:57 | |
*** alecm has quit IRC | 20:00 | |
*** RaFromBRC has joined #zope3-dev | 20:08 | |
*** romanofski has quit IRC | 20:16 | |
*** whit has quit IRC | 20:18 | |
*** jodok has joined #zope3-dev | 20:19 | |
*** whit has joined #zope3-dev | 20:20 | |
*** dobee has joined #zope3-dev | 20:21 | |
*** richardkan has quit IRC | 20:22 | |
*** junkafarian has quit IRC | 20:23 | |
*** jukart has joined #zope3-dev | 20:23 | |
*** MJ|dinner is now known as MJ | 20:23 | |
MJ | wiggy: see the WDL configure.zcml? | 20:24 |
*** kleist has quit IRC | 20:26 | |
wiggy | MJ: http://paste.plone.org/16207 should work from what I can see | 20:27 |
wiggy | but it doesn't | 20:27 |
wiggy | if I call provideSubscriptionAdapter(CommunityPurge) by hand it works fine though | 20:28 |
wiggy | so I know the actual adapter is correct | 20:28 |
MJ | uhm | 20:28 |
MJ | a subscriber get's notified by being called | 20:28 |
MJ | so what are you trying to achieve with an adapter instead? | 20:29 |
MJ | <subscriber factory=""> registers a factory; it'll be called to generate the actual subscriber. | 20:29 |
*** pcardune has quit IRC | 20:29 | |
wiggy | I know, that's perfectly fine for me | 20:29 |
wiggy | the zope.component README has a similar example | 20:29 |
MJ | so how doesn't it work? | 20:30 |
MJ | what goes wrong? | 20:30 |
wiggy | zope.component.subscibres([object], IUrlPurge) returns [] | 20:30 |
wiggy | minus several typos | 20:30 |
mgedmin | have you checked that your zcml is being processed (by, e.g., introducing syntax errors in it)? | 20:31 |
MJ | first of all, CommunityPurge is not a factory | 20:31 |
wiggy | mgedmin: yes | 20:31 |
MJ | so use the handler="" directive instead | 20:32 |
mgedmin | really? | 20:32 |
mgedmin | a class is a factory | 20:32 |
wiggy | in fact if I use handler="" zope explodes when parsing the zcml | 20:32 |
MJ | mgedmin: so where is the __call__ on that class then to handle the event? | 20:32 |
MJ | a subscriber is a callable that will handle the event | 20:33 |
wiggy | MJ: the type has a __call__ which creates the instance | 20:33 |
MJ | I am not sure what this should do. | 20:33 |
MJ | there is no IBaseContent event either.. | 20:33 |
wiggy | why is that relevant | 20:34 |
MJ | so, on a IBaseContent event, you create a CommunityPurge instance | 20:34 |
wiggy | I'm explicitly calling component.subscribers by hand | 20:34 |
wiggy | there are no events at all here | 20:34 |
MJ | right | 20:34 |
wiggy | events happen to use the same subscription adapters | 20:34 |
MJ | you are using the event/subscription machinery for something else. | 20:34 |
wiggy | right | 20:34 |
MJ | what's the usecase you are trying to solve then? | 20:34 |
wiggy | I'm not using the event machinery at all | 20:34 |
wiggy | I'm using subscription adapters | 20:35 |
MJ | this is beginning to dawn on me :) | 20:35 |
*** whit has quit IRC | 20:35 | |
wiggy | extending the relative and absolute URLs for PURGE expressions generated by CacheSetup is the use case | 20:35 |
mgedmin | could this be a permission problem of some kind? | 20:35 |
wiggy | no, it's a zcml thing | 20:35 |
* mgedmin has no idea and is just scrapping the bottom of the debugging idea barrel | 20:35 | |
wiggy | calling component.provideSubscriptionAdapter(factory=CommunityPurge) works great | 20:36 |
wiggy | which tells me that the factory itself works fine | 20:36 |
wiggy | it just isn't registered properly | 20:36 |
mgedmin | I just looked at the implementation of the zcml 'subscriber' directive, and the implementation of provideSubscriptionAdapter, and I see no differences | 20:36 |
mgedmin | both call registerSubscriptionAdapter on the global registry | 20:36 |
mgedmin | maybe you have two different interfaces named IBaseContent? | 20:36 |
mgedmin | what if you omitted the for="" from the <subscriber> ? | 20:37 |
wiggy | still doesn't work (tried that before I added it) | 20:37 |
MJ | wiggy: I strongly suspect that <subscriber> is not what you are looking for.. | 20:37 |
wiggy | MJ: then tell me what it is I'm looking for :) | 20:37 |
wiggy | MJ: see http://paste.plone.org/16208 | 20:39 |
MJ | my suspicion appears to be wrong | 20:40 |
MJ | provideSubscriptionAdapter calls .subscribe, as does the subscriber directive handler. | 20:40 |
* mgedmin blames the aura of zope 2 | 20:40 | |
* MJ forgot about subscription adapters | 20:41 | |
MJ | sorry | 20:41 |
wiggy | they're not used very often, but they are really useful | 20:41 |
wiggy | where's the kind for <subscriber> ? | 20:42 |
*** whit has joined #zope3-dev | 20:43 | |
wiggy | ah, there | 20:43 |
*** pcardune has joined #zope3-dev | 20:44 | |
MJ | wiggy: did you try and drop the for argument? | 20:44 |
wiggy | yes | 20:44 |
MJ | you don't provide it when calling provideSubscriptionAdapter | 20:44 |
MJ | and what happens? | 20:44 |
wiggy | doesn't work | 20:44 |
MJ | leave out for, but do include provides | 20:45 |
MJ | erm | 20:46 |
MJ | skip the last sentence.. | 20:46 |
*** MacYET has joined #zope3-dev | 20:46 | |
*** jsadjohnson has joined #zope3-dev | 20:46 | |
MJ | okay, from what I can make out of the directive handler (zope.app.component.metaconfigure.subscriber), just stating | 20:47 |
wiggy | putting a pdb in subscriber() there shows that provides=None | 20:48 |
MJ | <subscriber handler=".purge.CommunityPurge"> should Just Work. | 20:48 |
MJ | put a pdb in provideSubscriptionAdapter and see what arguments get passed when it is called when the directive is processed. | 20:49 |
MJ | it's all a bit indirect. | 20:49 |
*** deo has quit IRC | 20:49 | |
wiggy | for=None for both handler and factory | 20:49 |
wiggy | sorry, provides=None | 20:49 |
MJ | handler == factory, as far as the directive is concerned.. | 20:50 |
wiggy | seems it doesn't have code to figure out provides, unlike other zcml directives | 20:50 |
wiggy | at least the version in zope 2.9 doesn't | 20:51 |
MJ | no, it counts on provideSubcriptionAdapter to figure that out. | 20:51 |
MJ | when you call provideSubscriptionAdapter directly, you didn't specify provides either.. | 20:51 |
wiggy | true | 20:52 |
wiggy | however, specifying for= in the zcml fixes things | 20:52 |
MJ | so put a pdb.set_trace in provideSubscriptionAdapter | 20:52 |
MJ | without for= should be fine.. | 20:53 |
wiggy | where is that? | 20:53 |
MJ | provideSubscriptionAdapter? | 20:53 |
wiggy | yes | 20:53 |
MJ | aarg | 20:53 |
wiggy | oh, there | 20:53 |
MJ | the directive doesn't call that directly... | 20:53 |
MJ | ships | 20:54 |
* wiggy going to punt on this for now | 20:54 | |
wiggy | deadlines and so :(" | 20:54 |
MJ | it calls .purge.CommunityPurge | 20:54 |
MJ | erm, wrong copy buffer | 20:54 |
wiggy | and zope 2.9 is ancient enough that it doesn't warrant too much work | 20:54 |
MJ | it calls getGlobalSiteManager().subscribe | 20:54 |
MJ | okay | 20:55 |
*** b52laptop has quit IRC | 20:55 | |
MJ | you need to compare zope.component.site.GlobalSiteManager.subscribe calls | 20:55 |
MJ | see what gets passed when you call provideSubscriptionAdapter | 20:56 |
MJ | and what gets passed when using the subscriber directive. | 20:56 |
MJ | and make them match up ;) | 20:57 |
MJ | wiggy: bingo | 20:58 |
MJ | wiggy: you *need* to specify provides when using <subscriber> | 20:58 |
MacYET | does any know what """ /opt/zope/2.10.4/lib/python/zope/configuration/fields.py:417: UserWarning: You did not specify an i18n translation domain for the 'title' field in /Users/ajung_data/sandboxes/plone3.0/Products/SmartPrintNG/configure.zcml""" means? | 20:58 |
wiggy | is there a rationale for that? | 20:58 |
wiggy | MacYET: add i18n_domain="plone" or so to configure.zcml's <configure> root element | 20:58 |
wiggy | MacYET: the translation machinery uses that to translate the profile title & description | 20:59 |
MJ | provideSubscriptionAdapter figures that out for you | 20:59 |
MJ | but the subscriber directive handler does not. | 20:59 |
MJ | because the subscriber directive is aimed at event subscribers | 20:59 |
wiggy | MJ: that feels a bit weird | 20:59 |
MJ | wiggy: that's because you are using the subscriber directive for a different use-case, I'd say. | 21:00 |
MacYET | tnx | 21:00 |
*** deo has joined #zope3-dev | 21:01 | |
MJ | wiggy: so, replace the for="" line with a provides="IPurgeUrls" line.. | 21:01 |
MJ | the for="" part the handler will figure out itself. | 21:01 |
*** dobee has quit IRC | 21:01 | |
MJ | erm | 21:02 |
*** rlo has joined #zope3-dev | 21:02 | |
MJ | provides="IBaseContent" actually | 21:02 |
wiggy | MacYET: since it is i18n_domain instead of i18n:domain you don't need to define xmlns:i18n | 21:03 |
MacYET | +i know :) | 21:03 |
MacYET | don#t read my checkins :) | 21:04 |
philiKON_ | MacYET kann nix | 21:04 |
MJ | wiggy: yes, on rereading the source, I am convinced that <subscriber provides="Products.Archetypes.interfaces.IBaseContent" handler=".purge.CommunityPurge" /> will work. | 21:04 |
MacYET | philiKON_: *slap* | 21:04 |
MJ | wiggy: which also clears my confusion about your use of that interface in the 'for' attribute. | 21:04 |
* philiKON_ rubs cheek | 21:04 | |
wiggy | MJ: as I said 13 minutes ago that works fine indeed :) | 21:06 |
MJ | wiggy: and now you know why too! :) | 21:06 |
MJ | for lists implemented interfaces of the adapter | 21:06 |
MJ | provides lists adapted interfaces.. | 21:06 |
MJ | OMG Hedningarna is cool music | 21:09 |
* MJ loves living in Scandinavia :) | 21:09 | |
MJ | sorry, resume your regularly scheduled tech subjects.. | 21:09 |
*** naro has quit IRC | 21:10 | |
*** jukart has quit IRC | 21:11 | |
*** naro has joined #zope3-dev | 21:13 | |
*** redir has quit IRC | 21:17 | |
*** naro has left #zope3-dev | 21:19 | |
*** fcorrea has joined #zope3-dev | 21:19 | |
*** deo has quit IRC | 21:25 | |
*** pbugni has quit IRC | 21:27 | |
*** deo has joined #zope3-dev | 21:28 | |
*** mgedmin has quit IRC | 21:36 | |
*** edgordon has quit IRC | 21:37 | |
*** oferw has joined #zope3-dev | 21:39 | |
*** whit has quit IRC | 21:49 | |
*** rlo has quit IRC | 21:52 | |
*** Newfie2007 has quit IRC | 21:53 | |
*** edgordon has joined #zope3-dev | 21:53 | |
*** redir has joined #zope3-dev | 21:56 | |
*** jhauser has quit IRC | 21:58 | |
*** cursor has quit IRC | 22:00 | |
*** oferw has quit IRC | 22:02 | |
*** whit has joined #zope3-dev | 22:04 | |
*** rlo has joined #zope3-dev | 22:05 | |
*** greenman has joined #zope3-dev | 22:06 | |
*** redir has quit IRC | 22:14 | |
*** whit has quit IRC | 22:16 | |
*** danfairs has joined #zope3-dev | 22:25 | |
danfairs | Hi - I'm having a problem installing grok in a workingenv using python 2.4.4. Output: http://rafb.net/p/Qzdbtz86.html | 22:28 |
danfairs | It's a fresh workingenv (actually the first time I've used it). Aside from that, I'm following the instructions on http://grok.zope.org/tutorial.html | 22:29 |
danfairs | Any hints? | 22:29 |
*** netshade has joined #zope3-dev | 22:29 | |
*** marianom has joined #zope3-dev | 22:31 | |
*** MacYET has left #zope3-dev | 22:31 | |
*** ktwilight has joined #zope3-dev | 22:32 | |
ccomb | Hi, I want the user to be able to choose among a list of named adapters. | 22:39 |
ccomb | how can I retrieve the list of names for these adapters ? | 22:39 |
ccomb | I don't want to retrieve the actual adaters with getAdapters , but just their names | 22:40 |
ccomb | Should I register them as factory utilities and get the list with getUtilitiesFor ? | 22:41 |
ccomb | Is there a way to register an adapter once so that it appears both as an adapter and as an utility ? | 22:41 |
danfairs | aha, there's a #grok, I shall ask there... | 22:42 |
ccomb | really, grok? | 22:42 |
benji_ | ccomb: I like the getUtilitiesFor approach | 22:42 |
*** benji_ is now known as benji | 22:43 | |
ccomb | benji: so I must dual-register? | 22:43 |
benji | clear | 22:43 |
benji | heh; that doesn't work in IRC so well | 22:43 |
benji | ccomb: if it's registered as a utility, why would it need to be an adapter too? | 22:44 |
ccomb | good question | 22:44 |
ccomb | You're right, I will use them just as utilities, anyway I'm unable to use the syntax shortcut IAdapter(obj), because I must explicitly choose one | 22:45 |
danfairs | ccomb: yes, grok ;) Been meaning to try it for ages... | 22:46 |
ccomb | And I'm storing the setting in an attribute | 22:46 |
ccomb | I have so many things to try, grok, z3c.form, hurry.workflow, etc... | 22:47 |
ccomb | I would like each days to last 48h | 22:47 |
*** ktwilight_ has quit IRC | 22:47 | |
*** jsadjohnson has quit IRC | 22:49 | |
*** d2m has quit IRC | 22:50 | |
benji | ccomb: sleep is the enemy ;) | 22:51 |
ccomb | lack of sleep is even worse | 22:52 |
ccomb | because it make bugs spawn in my brain | 22:52 |
*** pbugni has joined #zope3-dev | 22:59 | |
*** jfroche has quit IRC | 23:02 | |
*** jsadjohnson has joined #zope3-dev | 23:11 | |
*** MJ|nickcollision has joined #zope3-dev | 23:15 | |
*** MJ has quit IRC | 23:16 | |
*** MJ|nickcollision is now known as MJ | 23:16 | |
*** MJ has quit IRC | 23:18 | |
*** junkafarian has joined #zope3-dev | 23:21 | |
junkafarian | hey can any one tell me why this isnt working.... | 23:22 |
junkafarian | ive got a master template with: | 23:23 |
junkafarian | <html xmlns:metal="http://xml.zope.org/namespaces/metal" metal:define-macro="letscreateart"> | 23:23 |
junkafarian | then another template in the same folder with: | 23:23 |
junkafarian | <html xmlns:metal="http://xml.zope.org/namespaces/metal" metal:use-macro="master.pt/macros"> | 23:23 |
junkafarian | s/ sorry that last one was meant to include /letscreateart | 23:25 |
junkafarian | the error its giving is: | 23:27 |
junkafarian | PTRuntimeError: ['Compilation failed', 'zope.tal.taldefs.TALError: Invalid variable name "letscreateart" in expression u\'master.pt/macros/letscreateart\', at line 1, column 1'] | 23:27 |
wiggy | master.pt/macros ? | 23:33 |
junkafarian | s/master.pt/macros/letscreateart | 23:34 |
junkafarian | wiggy: ^ | 23:34 |
wiggy | why the .pt ? | 23:35 |
junkafarian | its the name of the template file | 23:35 |
*** rlo has quit IRC | 23:35 | |
junkafarian | felt it was the best naming convention | 23:35 |
wiggy | TAL expressions do not use filenames but traversal | 23:35 |
*** redir has joined #zope3-dev | 23:35 | |
junkafarian | what would be the correct traversal string? | 23:36 |
junkafarian | its in the same folder | 23:36 |
junkafarian | theres master.pt and contact.html | 23:36 |
junkafarian | use-macro is in contact.html | 23:36 |
junkafarian | should i paste it on lisp? | 23:37 |
junkafarian | wiggy: ^ | 23:38 |
wiggy | try master/macros/letscreateart | 23:38 |
junkafarian | the example on the zope wiki calls container/master.html/macros/hello | 23:40 |
junkafarian | however that returns a KeyError for 'container' | 23:41 |
benji | junkafarian: that looks like a Zope 2 example | 23:41 |
junkafarian | benji: is there zope3 example syntax somewhere? | 23:42 |
* junkafarian is new to metal | 23:42 | |
*** timte has joined #zope3-dev | 23:44 | |
benji | I don't know of an example off-hand of defining macros in one template and accessing them in another | 23:45 |
junkafarian | wiggy: ? | 23:47 |
junkafarian | benji: eg is on http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/AppendixC.stx | 23:47 |
wiggy | the z3 syntax is the same | 23:48 |
junkafarian | wiggy: should it start with container/ | 23:49 |
junkafarian | ? | 23:49 |
wiggy | if you want to start traversing from the current container that sounds like a good strategy | 23:50 |
benji | IIRC, you can just define a <browser:page for="*" name="my_macros" template="foo.pt"/> and then do use-macro="context/@@my_macros/bar" | 23:51 |
wiggy | @@my_macros/macros/bar I suspect | 23:51 |
benji | could be; I may not RC <wink> | 23:51 |
*** rocky is now known as rocky|away | 23:55 | |
junkafarian | errors with: TraversalError: (<zope.app.folder.folder.Folder object at 0x40ff9bec>, 'master') | 23:55 |
junkafarian | oop | 23:56 |
junkafarian | TraversalError: (<zope.app.pagetemplate.simpleviewclass.SimpleViewClass from /home/junkafarian/public_www/letscreateart/lib/python/letscreateart/master.pt object at 0x4155b94c>, 'macros') | 23:56 |
junkafarian | or with @@my_macros/macros/letscreateart | 23:57 |
junkafarian | PTRuntimeError: ['Compilation failed', 'zope.tal.taldefs.TALError: Invalid variable name "mast" in expression u\'@@master/macros/mast\', at line 1, column 1'] | 23:58 |
junkafarian | again | 23:58 |
junkafarian | :( | 23:59 |
Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!