*** timte has quit IRC | 00:05 | |
*** dunny has quit IRC | 00:06 | |
*** neo|4D has joined #zope | 00:14 | |
*** jim_SFU has quit IRC | 00:14 | |
*** neo|4D has quit IRC | 00:20 | |
*** kamathln has joined #zope | 00:29 | |
kamathln | Webdev gurus and Veterans might like answering me on this reddit: http://www.reddit.com/r/learnprogramming/comments/bnatn/what_are_the_common_patterns_in_web_programming/ | 00:29 |
---|---|---|
kamathln | kthxbi | 00:29 |
*** kamathln has quit IRC | 00:30 | |
*** benji has quit IRC | 00:32 | |
*** redir has quit IRC | 00:42 | |
shen-long | whoa boy | 00:44 |
*** alecm has quit IRC | 00:44 | |
shen-long | trying to figure out how to turn a catalog index search into a vocabulary | 00:44 |
shen-long | anyone done this before? | 00:45 |
*** JaRoel|4D has joined #zope | 00:45 | |
Charlie_X | Not me but it shouldn't be too hard | 00:45 |
shen-long | Charlie_X, trying to wrap my head around this, and my brain is exploding ;p | 00:46 |
shen-long | don't know what it is about this one simple task | 00:46 |
Charlie_X | What do want to be the keys in the vocabulary and what do you want to be the values? | 00:46 |
shen-long | right now I'm using SimpleVocabulary and SimpleTerm(value='something') | 00:47 |
shen-long | and trying to turn 'something' into a list from a catalog query on the field values of 'field' for all objects of 'this' type | 00:48 |
shen-long | hmm | 00:48 |
Charlie_X | You need a key to refer to your search results. I always do SimpleTerm(key, key, value) where keys must be ASCII | 00:48 |
shen-long | ahh | 00:48 |
shen-long | let me paste what I have so far | 00:49 |
shen-long | everything in the ui and catalog is working like I want right now | 00:49 |
shen-long | just need to figure out what to replace 'something' with | 00:49 |
shen-long | I think ... | 00:49 |
shen-long | one sec | 00:49 |
* Charlie_X has spent more time than he would like to admit on fighting with encodings this last week | 00:49 | |
shen-long | Charlie_X, yowch | 00:50 |
shen-long | Charlie_X, http://pastebin.com/hHzNxuKP | 00:50 |
shen-long | I know all the grok stuff is in the way | 00:50 |
shen-long | but really it's just the __call__ def I'm worried about right now | 00:51 |
shen-long | does it make sense? | 00:51 |
*** Hypergraphe has quit IRC | 00:51 | |
shen-long | whereas result_set = catalog[did_targets].apply('some search term') is getting the results I'm looking for in the catalog | 00:52 |
Charlie_X | It sort of makes sense | 00:54 |
shen-long | lol, yeah, I feel the same way ;p | 00:54 |
shen-long | a did is a phone number | 00:54 |
shen-long | this is going to manage a freeswitch pbx | 00:54 |
shen-long | and I want to get a list of available targets for each did that is added | 00:55 |
shen-long | so when a call comes in freeswitch knows what to ring | 00:55 |
shen-long | whether it be a group, an external number, or a recording | 00:55 |
shen-long | grok has really helped bootstrap the dev, but I've hit a brick wall when trying to handle relations | 00:56 |
shen-long | and I think it's because I'm missing something fundamental | 00:56 |
Charlie_X | Do you get an AttributeError | 00:56 |
shen-long | no | 00:56 |
shen-long | no errors now | 00:56 |
shen-long | something shows up as the only thing available in the list | 00:56 |
shen-long | I'm using it further down .. like so | 00:57 |
Charlie_X | You're only putting one thing in the list. I get an error trying to construct even your example. | 00:57 |
shen-long | http://pastebin.com/wWqu6yTW | 00:58 |
shen-long | oh? | 00:58 |
shen-long | well yeah, I could put a bunch of stuff in the list I'm sure | 00:59 |
shen-long | have vnc? ;p | 00:59 |
Charlie_X | No, mo vnc - TeamViewer - and it's pretty late in Jormany | 01:00 |
*** dvschramm has left #zope | 01:00 | |
shen-long | ahh | 01:00 |
shen-long | well, thanks for looking either way :) | 01:00 |
shen-long | do you know of any packages I might look at to help understand what I'm intending to do here? | 01:00 |
Charlie_X | If that is your registered vocabulary then it will only ever have one value | 01:01 |
shen-long | ie, how rough would it be to make 'something' a list of returned objects from a catalog query ? | 01:01 |
Charlie_X | hm, I learned all my stuff from Philip's truly excellent book. | 01:01 |
shen-long | I have that book | 01:01 |
Charlie_X | I normally make my terms in a list comprehension | 01:02 |
*** mcdonc has quit IRC | 01:02 | |
shen-long | k | 01:03 |
shen-long | I can handle that | 01:03 |
shen-long | just .. not sure how to get the catalog result set as anything else | 01:03 |
*** TresEquis has quit IRC | 01:03 | |
Charlie_X | terms = [SimpleTerm(key, key, value for key, value from iterable]; vocab = SimpleVocabulary(terms) | 01:03 |
shen-long | ahh | 01:03 |
Charlie_X | catalog.searchResults() is an interable | 01:04 |
shen-long | ahh | 01:04 |
shen-long | so | 01:04 |
shen-long | pseudocode wise ... | 01:04 |
Charlie_X | iterable, even | 01:04 |
Charlie_X | Anyone know how the footy went this evening? | 01:04 |
shen-long | terms = [SimpleTerm(key, mykeytype, v for k, v ..... ??? | 01:05 |
shen-long | vocab = SimpleVocabulary(terms) | 01:05 |
Charlie_X | No. token and value are usually the same | 01:08 |
Charlie_X | token - the first item in the tuple is a something required internally by zope. value - the second item is the value you see in any form and what is actually displayed. | 01:10 |
shen-long | ahh ok | 01:11 |
shen-long | so, where would the catalog go? | 01:15 |
Charlie_X | It feeds your vocabulary. So, either in that method if it's compact enough or a separate one. Is 'query' the catalog result set? | 01:17 |
shen-long | yes | 01:17 |
Charlie_X | I may be talking shit about the token, value, title stuff, I've just realised. The title is a nice to have | 01:18 |
shen-long | hehe | 01:19 |
Charlie_X | So whatever you have in your catalog metadata - queryable directly from the result set - can be pumped into your vocabulary. | 01:19 |
shen-long | yeah I'm reading that | 01:19 |
shen-long | ok | 01:20 |
shen-long | so it looks like ... | 01:20 |
shen-long | terms = [SimpleTerm(MyFirstThing), SimpleTerm(MySecondThing)] | 01:21 |
shen-long | so now I'm getting it, iterate that over the query set once it's a list | 01:21 |
Charlie_X | say you have 'did' in the metadata: terms = [SimpleTerm(r.did, r.did, r.Title) for r in searchResults] | 01:22 |
shen-long | thank you, I needed that ;p | 01:22 |
shen-long | so, ok, cool | 01:23 |
*** dunny has joined #zope | 01:23 | |
Charlie_X | I don't understand iterate over the query set once it's a list. An iterable is anything for which "for x in iterable" works | 01:23 |
shen-long | so the catalog query results can be used directly | 01:23 |
Charlie_X | Yes, indeed. No need to coerce them into a list. | 01:23 |
shen-long | ok, thank you very much | 01:24 |
shen-long | pretty sure I've got enough to put myself further in the mess ;) | 01:24 |
Charlie_X | Vocabularies can, and often are, simple functions. | 01:24 |
shen-long | Charlie_X, thanks! :) | 01:26 |
Charlie_X | You're welcome. Hope it works for you. | 01:26 |
*** mr_jolly has joined #zope | 01:26 | |
shen-long | lol, me too | 01:26 |
*** fredvd|meeting has quit IRC | 01:27 | |
Charlie_X | Right bed time for me | 01:27 |
Charlie_X | nighty night | 01:27 |
*** Charlie_X has left #zope | 01:28 | |
*** ccomb has joined #zope | 01:28 | |
*** mr_jolly has left #zope | 01:28 | |
*** digitalmortician has joined #zope | 01:33 | |
*** webmaven has quit IRC | 01:43 | |
*** opsec has quit IRC | 01:44 | |
*** aaronv has joined #zope | 01:53 | |
*** pepeu has quit IRC | 01:54 | |
*** ccomb has quit IRC | 01:58 | |
*** opsec has joined #zope | 02:04 | |
*** purserj has quit IRC | 02:08 | |
*** purserj has joined #zope | 02:08 | |
*** RaFromBRC has quit IRC | 02:26 | |
*** RaFromBRC has joined #zope | 02:27 | |
*** runyaga has quit IRC | 02:39 | |
*** aiko74 has quit IRC | 02:40 | |
*** daMaestro has quit IRC | 02:46 | |
*** aiko74 has joined #zope | 02:51 | |
*** runyaga has joined #zope | 02:59 | |
*** daMaestro has joined #zope | 02:59 | |
*** MatthewWilkes has joined #zope | 03:00 | |
*** r0ver has joined #zope | 03:14 | |
*** alvaro__ has joined #zope | 03:21 | |
*** mcdonc has joined #zope | 03:44 | |
*** mcdonc_ has joined #zope | 03:44 | |
*** mcdonc has quit IRC | 03:44 | |
*** mcdonc_ is now known as mcdonc | 03:44 | |
*** tiwula has quit IRC | 03:55 | |
*** r0ver has left #zope | 04:01 | |
*** tiwula has joined #zope | 04:18 | |
*** aaronv has quit IRC | 04:28 | |
*** RaFromBRC has quit IRC | 04:59 | |
*** pepeu has joined #zope | 05:09 | |
*** pepeu_ has joined #zope | 05:10 | |
*** thetetet has joined #zope | 05:40 | |
*** thetet has quit IRC | 05:44 | |
*** thetetet has quit IRC | 06:06 | |
*** dunny has quit IRC | 06:30 | |
*** dunny has joined #zope | 06:30 | |
*** dunny has quit IRC | 06:30 | |
*** dunny has joined #zope | 06:30 | |
*** dunny has quit IRC | 06:31 | |
*** dunny has joined #zope | 06:31 | |
*** dunny has quit IRC | 06:34 | |
*** dunny has joined #zope | 06:34 | |
*** MatthewWilkes has quit IRC | 06:48 | |
*** sidnei has quit IRC | 06:53 | |
*** MatthewWilkes has joined #zope | 06:54 | |
*** dunny has quit IRC | 06:54 | |
*** sidnei has joined #zope | 07:00 | |
*** baijum has joined #zope | 07:08 | |
*** daMaestro has quit IRC | 07:12 | |
*** davisagli has quit IRC | 07:23 | |
*** pepeu_ has quit IRC | 07:45 | |
*** runyaga is now known as run|away | 07:50 | |
*** huajie has joined #zope | 08:01 | |
*** baijum has quit IRC | 08:04 | |
*** timte has joined #zope | 08:32 | |
*** tisto has joined #zope | 08:41 | |
*** MatthewWilkes has quit IRC | 08:42 | |
*** redir has joined #zope | 08:45 | |
*** MatthewWilkes has joined #zope | 08:47 | |
*** zagy has quit IRC | 08:49 | |
*** zagy has joined #zope | 08:54 | |
*** JaRoel|4D has quit IRC | 08:54 | |
*** betabug_island has joined #zope | 09:01 | |
*** svenn has joined #zope | 09:11 | |
*** svenn has quit IRC | 09:19 | |
*** digitalmortician has quit IRC | 09:25 | |
*** phimic has joined #zope | 09:26 | |
*** sashav has joined #zope | 09:29 | |
*** huajie has quit IRC | 09:30 | |
*** redir has quit IRC | 09:37 | |
*** Kabz|4D has joined #zope | 09:41 | |
*** tisto has quit IRC | 09:45 | |
*** zagy1 has joined #zope | 09:47 | |
*** zagy has quit IRC | 09:47 | |
*** zagy1 has quit IRC | 09:48 | |
*** run|away has quit IRC | 09:54 | |
*** JaRoel|4D has joined #zope | 09:56 | |
*** tisto has joined #zope | 09:58 | |
*** ccomb has joined #zope | 09:58 | |
*** neo|4D has joined #zope | 09:58 | |
*** MatthewWilkes has quit IRC | 09:59 | |
*** skt has joined #zope | 10:05 | |
*** tiwula has quit IRC | 10:19 | |
*** digitalmortician has joined #zope | 10:22 | |
*** ccomb1 has joined #zope | 10:27 | |
*** ccomb has quit IRC | 10:28 | |
*** planetzopebot has quit IRC | 10:33 | |
*** planetzopebot has joined #zope | 10:34 | |
*** Arfrever has quit IRC | 10:37 | |
*** agroszer has joined #zope | 10:48 | |
*** baijum has joined #zope | 10:50 | |
*** hever has joined #zope | 10:51 | |
*** zagy has joined #zope | 10:55 | |
*** mcdonc has quit IRC | 10:56 | |
*** eperez has joined #zope | 11:05 | |
*** sunew has joined #zope | 11:09 | |
*** dunny has joined #zope | 11:16 | |
*** agroszer has quit IRC | 11:28 | |
*** aiko74 has quit IRC | 11:34 | |
*** fredvd has joined #zope | 11:38 | |
*** hever has quit IRC | 11:48 | |
*** Guest45562 is now known as Wu | 11:49 | |
*** TomBlockley has joined #zope | 11:55 | |
*** MJ has joined #zope | 12:00 | |
*** mr_jolly has joined #zope | 12:00 | |
*** emrojo has joined #zope | 12:06 | |
*** evilbungle has joined #zope | 12:07 | |
*** olaf has quit IRC | 12:24 | |
*** olaf has joined #zope | 12:25 | |
*** olaf has joined #zope | 12:25 | |
*** vigith has joined #zope | 12:26 | |
*** vigith has quit IRC | 12:26 | |
*** vigith has joined #zope | 12:26 | |
*** teix has joined #zope | 12:32 | |
*** baijum has quit IRC | 12:38 | |
*** baijum has joined #zope | 12:39 | |
*** baijum has quit IRC | 13:22 | |
*** agroszer has joined #zope | 13:27 | |
*** thetet has joined #zope | 13:30 | |
*** fredvd has quit IRC | 13:34 | |
*** TKtiddle has joined #zope | 13:45 | |
*** fredvd has joined #zope | 13:45 | |
*** purserj has quit IRC | 13:46 | |
*** purserj has joined #zope | 13:47 | |
TKtiddle | Hi, Does anyone know if its possible to add some kind of filter to pagetemplates? I have content which i get with tal:content="structure view/render" but I want to filter out some of this content. I.e I only want to display content that has a certain html class | 13:51 |
*** menesis1 has quit IRC | 13:55 | |
betabug_island | TKtiddle: you can do anything you want with python | 13:56 |
betabug_island | but I'd suggest putting that stuff in a python method, as it sounds like it will get complicated quick | 13:57 |
TKtiddle | yes, ok if i create a pyton script how do i call it from a page template using tal? is there a walk through anywhere? | 13:58 |
betabug_island | sure, that kind of stuff is in the zope book - docs.zope.org | 13:58 |
*** kleist has joined #zope | 13:59 | |
betabug_island | but a python script limits you to what you can do with python (security restrictions), you probably want this in your product code | 14:00 |
*** TKtiddle has quit IRC | 14:00 | |
*** TKtiddle has joined #zope | 14:00 | |
*** touff has quit IRC | 14:01 | |
teix | TKtiddle: since you're already using a view just define new methods on it | 14:04 |
*** aaronv has joined #zope | 14:04 | |
teix | betabug_island: Is Greece a island, right now? :) | 14:05 |
betabug_island | teix: I'm on a greek island right now, Naxos | 14:06 |
betabug_island | working here this week :-) | 14:06 |
kleist | betabug, Naxos has an airport now? i was there 1982, then there was none... i went by boat from Piraeus | 14:07 |
betabug_island | it has an airport, yes - but I came by boat too, much cheaper | 14:07 |
betabug_island | and also much more enjoyable, I don't like planes too much | 14:08 |
kleist | true | 14:08 |
teix | betabug_island: nice vacances! and work too... :) | 14:08 |
kleist | is there DSL ? | 14:08 |
kleist | i mean, broadband internet? | 14:08 |
betabug_island | vacation was only over the easter weekend | 14:08 |
betabug_island | maybe there is, but I'm on a 3G connection using my mobile phone | 14:09 |
kleist | ach! | 14:09 |
*** emrojo has quit IRC | 14:09 | |
betabug_island | I think they have ADSL in town, unlikely to work in the little village where I am | 14:09 |
*** benji has joined #zope | 14:21 | |
*** zagy has quit IRC | 14:56 | |
*** touff has joined #zope | 14:57 | |
*** zagy has joined #zope | 15:02 | |
*** rosepruyne has joined #zope | 15:05 | |
*** rosepruyne has left #zope | 15:05 | |
*** menesis1 has joined #zope | 15:24 | |
*** menesis1 has left #zope | 15:33 | |
*** menesis has joined #zope | 15:34 | |
TKtiddle | teix: excuse my ignorance, im just reading docs now, is a view a python object that produces html? | 15:36 |
*** skt has quit IRC | 15:43 | |
*** tisto has quit IRC | 15:45 | |
*** hever has joined #zope | 15:47 | |
*** baijum has joined #zope | 15:56 | |
*** tisto has joined #zope | 15:58 | |
*** TomBlockley_ has joined #zope | 16:04 | |
*** TomBlockley has quit IRC | 16:04 | |
*** TomBlockley_ is now known as TomBlockley | 16:04 | |
*** sunew has quit IRC | 16:08 | |
*** sunew has joined #zope | 16:10 | |
*** menesis has quit IRC | 16:11 | |
*** thetet has quit IRC | 16:14 | |
*** sunew has quit IRC | 16:15 | |
*** sunew has joined #zope | 16:15 | |
*** phimic has quit IRC | 16:17 | |
*** redir has joined #zope | 16:25 | |
*** fredvd has quit IRC | 16:27 | |
*** dunny has quit IRC | 16:27 | |
*** menesis has joined #zope | 16:28 | |
*** mcdonc has joined #zope | 16:29 | |
*** fredvd has joined #zope | 16:42 | |
*** sashav has quit IRC | 16:43 | |
*** mgedmin has joined #zope | 16:48 | |
teix | TKtiddle: i just saw that 'view/render' tal expression. seems that you're using browser views and there is a method render that returns html to the template | 16:55 |
*** r0ver has joined #zope | 16:59 | |
*** TomBlockley has quit IRC | 17:01 | |
*** TomBlockley has joined #zope | 17:02 | |
*** digitalmortician has quit IRC | 17:08 | |
*** vigith has quit IRC | 17:09 | |
*** betabug_island has quit IRC | 17:09 | |
*** baijum has quit IRC | 17:24 | |
*** egon has joined #zope | 17:29 | |
*** egon has quit IRC | 17:31 | |
*** jim_SFU has joined #zope | 17:38 | |
*** timte has quit IRC | 17:47 | |
*** allisterb_ has joined #zope | 17:52 | |
*** allisterb has quit IRC | 17:53 | |
*** alvaro_ has quit IRC | 18:02 | |
*** alvaro__ has quit IRC | 18:03 | |
*** opsec has quit IRC | 18:05 | |
*** fredvd is now known as fredvd|sport | 18:07 | |
*** fredvd|sport is now known as fredvd|dinner | 18:11 | |
*** hartym has quit IRC | 18:13 | |
*** TresEquis has joined #zope | 18:13 | |
*** opsec has joined #zope | 18:19 | |
*** digitalmortician has joined #zope | 18:23 | |
*** hever has quit IRC | 18:23 | |
*** baijum has joined #zope | 18:24 | |
*** hartym has joined #zope | 18:26 | |
*** r0ver has quit IRC | 18:30 | |
*** sunew has quit IRC | 18:50 | |
*** tiwula has joined #zope | 18:53 | |
*** MJ has quit IRC | 18:54 | |
*** neo|4D has quit IRC | 19:03 | |
*** TresEquis has quit IRC | 19:05 | |
*** TresEquis has joined #zope | 19:05 | |
*** danielblackburn has joined #zope | 19:07 | |
*** JaRoel|4D has quit IRC | 19:08 | |
*** Kabz|4D has quit IRC | 19:10 | |
*** danielblackburn has left #zope | 19:10 | |
*** neo|4D has joined #zope | 19:13 | |
*** azazel` has joined #zope | 19:14 | |
azazel` | hi all | 19:14 |
azazel` | any idea of if and how it's possible to "broadcast" zope events across zeo clients? maybe using something like zasync? | 19:16 |
*** jbg has joined #zope | 19:23 | |
*** jbg is now known as Guest11664 | 19:24 | |
*** Guest11664 has quit IRC | 19:25 | |
*** astoon has joined #zope | 19:30 | |
*** mcdonc has quit IRC | 19:42 | |
*** baijum has quit IRC | 19:42 | |
*** neo|4D has quit IRC | 19:44 | |
*** davisagli has joined #zope | 19:45 | |
*** mcdonc has joined #zope | 19:45 | |
*** mcdonc has quit IRC | 19:55 | |
*** mcdonc_ has joined #zope | 19:55 | |
*** mcdonc_ has quit IRC | 19:55 | |
*** mcdonc has joined #zope | 19:56 | |
*** MJ has joined #zope | 20:02 | |
*** MJ has quit IRC | 20:03 | |
*** agroszer has quit IRC | 20:05 | |
*** RaFromBRC has joined #zope | 20:14 | |
*** mgedmin has quit IRC | 20:21 | |
*** eperez has quit IRC | 20:27 | |
mcdonc | azazel`: i dont know how to do it, but i think it's possible, because invalidation events are sent to clients when an object is changed | 20:31 |
mcdonc | (or at least that's my understanding of how it works) | 20:32 |
*** r0ver has joined #zope | 20:32 | |
*** grahal_ has quit IRC | 20:44 | |
*** grahal_ has joined #zope | 20:44 | |
*** r0ver has left #zope | 20:56 | |
*** menesis has quit IRC | 21:06 | |
*** kleist has quit IRC | 21:09 | |
*** sunew has joined #zope | 21:13 | |
*** ccomb1 has quit IRC | 21:20 | |
*** astoon has quit IRC | 21:20 | |
*** teix has quit IRC | 21:20 | |
*** TKtiddle has quit IRC | 21:24 | |
*** ccomb has joined #zope | 21:25 | |
*** TKtiddle has joined #zope | 21:29 | |
*** JaRoel|4D has joined #zope | 21:30 | |
*** TKtiddle has quit IRC | 21:33 | |
*** TKtiddle has joined #zope | 21:34 | |
*** JaRoel|4D has quit IRC | 21:37 | |
*** TomBlockley has left #zope | 21:40 | |
*** TomBlockley has joined #zope | 21:42 | |
*** tisto has quit IRC | 21:44 | |
*** runyaga has joined #zope | 21:52 | |
*** aaronv has quit IRC | 22:16 | |
*** JaRoel|4D has joined #zope | 22:21 | |
*** sidnei has quit IRC | 22:21 | |
*** sidnei has joined #zope | 22:22 | |
*** Arfrever has joined #zope | 22:25 | |
*** daMaestro has joined #zope | 22:41 | |
*** TresEquis has quit IRC | 22:54 | |
*** TresEquis has joined #zope | 22:54 | |
*** RaFromBRC has quit IRC | 23:25 | |
*** dunny has joined #zope | 23:28 | |
*** sunew has quit IRC | 23:29 | |
*** fredvd|dinner has quit IRC | 23:32 | |
*** RaFromBRC has joined #zope | 23:38 | |
*** fredvd has joined #zope | 23:42 | |
*** RaFromBRC has quit IRC | 23:47 | |
*** webmaven has joined #zope | 23:47 | |
*** TKtiddle has quit IRC | 23:50 | |
*** aaronv has joined #zope | 23:51 | |
*** mcdonc has quit IRC | 23:55 | |
*** mcdonc has joined #zope | 23:56 | |
*** mcdonc_ has joined #zope | 23:57 | |
*** mcdonc has quit IRC | 23:57 | |
*** mcdonc_ is now known as mcdonc | 23:57 |
Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!