philiKON | um, ok | 00:00 |
---|---|---|
flox | but since this seach module is not related to the context, | 00:00 |
philiKON | seems a bit overkill | 00:00 |
flox | i think of a tal:content"structure provider:mypackage.ISearch" to do that | 00:01 |
flox | the search module will display 3 search fields | 00:01 |
flox | u do not recommend to use "formlib" in that case? | 00:01 |
flox | a classic approach with metal and use-macro is better? | 00:03 |
philiKON | you're asking as if those were alternatives | 00:03 |
philiKON | using a content provider is a possibility | 00:04 |
philiKON | it's definitely more flexible than macros | 00:04 |
philiKON | the question is whether you need that flexibility | 00:04 |
flox | in that case, maybe not... | 00:04 |
philiKON | you can always use formlib | 00:04 |
flox | but since i read the "zope.formlib" thing, i want to put formlib everywhere ;-) | 00:05 |
philiKON | you can use formlib in a macro, or you could make a formlib-driven content provider | 00:05 |
philiKON | your choice | 00:05 |
philiKON | you have to decide whether you actually need the machinery formlib give syou | 00:05 |
philiKON | for a search box, it *seems* overkill | 00:05 |
flox | my first draft was a formlib... and i fire a "getMultiAdapter()" to bring the formlib into the page.... | 00:07 |
flox | heavy :-( | 00:08 |
philiKON | whatever makes you happy | 00:08 |
flox | ok, i will look further to simplify it | 00:08 |
flox | factly my concern is "contentprovider" or "macro" | 00:11 |
flox | i've found only 2 examples that use zope.contentprovider in various zope3 SVN repositories | 00:11 |
flox | the zf.zscp package from Zope Fundation, and a "Help" link on Schooltool | 00:12 |
flox | other packages only use the "zope.viewlet" as content provider. | 00:13 |
* flox is wondering if it is planned to use 'zope.formlib' for directives <browser:editform> and <browser:schemadisplay> | 00:35 | |
flox | for release 3.5, maybe? | 00:36 |
*** philiKON has quit IRC | 00:36 | |
benji | doubtful, flox; more likely is that those ZCML directives will go away | 00:36 |
flox | benji, i was thinking of this option, too | 00:37 |
flox | sice zope.formlib simplify things considerably | 00:37 |
flox | s/sice/since/ | 00:37 |
flox | sweet night! | 00:41 |
*** flox is now known as flox|away | 00:41 | |
*** benji has quit IRC | 00:47 | |
*** oferw has joined #zope3-dev | 00:49 | |
*** nisha_cgx has quit IRC | 00:51 | |
*** d2m has left #zope3-dev | 01:42 | |
*** philiKON has joined #zope3-dev | 01:44 | |
*** oferw has quit IRC | 01:52 | |
*** nisha_cgx has joined #zope3-dev | 01:55 | |
*** J1m has quit IRC | 02:04 | |
*** Nisha_Mehta_ has joined #zope3-dev | 02:04 | |
*** Aiste_ has joined #zope3-dev | 02:06 | |
*** Aiste has quit IRC | 02:06 | |
*** Aiste_ has quit IRC | 02:09 | |
*** rocky is now known as rocky|Zzz | 02:17 | |
*** nisha_cgx has quit IRC | 02:23 | |
*** Nisha_Mehta_ has quit IRC | 02:31 | |
*** philiKON has quit IRC | 02:36 | |
*** projekt01 has joined #zope3-dev | 03:02 | |
*** stub has joined #zope3-dev | 03:21 | |
*** projekt01 has left #zope3-dev | 03:47 | |
*** hazmat has joined #zope3-dev | 04:22 | |
*** ChanServ sets mode: +o hazmat | 04:22 | |
*** dunny has quit IRC | 04:30 | |
*** hazmat has quit IRC | 05:00 | |
*** dunny has joined #zope3-dev | 05:16 | |
*** hazmat has joined #zope3-dev | 05:35 | |
*** ChanServ sets mode: +o hazmat | 05:35 | |
*** jan_s has joined #zope3-dev | 05:45 | |
*** stub has quit IRC | 05:53 | |
*** hazmat has quit IRC | 06:01 | |
*** MiUlEr has joined #zope3-dev | 06:10 | |
*** Aiste has joined #zope3-dev | 06:26 | |
*** baijum has joined #zope3-dev | 06:48 | |
*** hazmat has joined #zope3-dev | 07:04 | |
*** ChanServ sets mode: +o hazmat | 07:04 | |
*** niemeyer has quit IRC | 07:08 | |
*** baijum has quit IRC | 07:09 | |
*** yota_ has joined #zope3-dev | 07:53 | |
*** yota_ is now known as yota | 07:55 | |
*** hazmat has quit IRC | 08:00 | |
*** MiUlEr has quit IRC | 08:31 | |
*** MJ has quit IRC | 08:50 | |
*** yota has quit IRC | 09:11 | |
*** alecm has quit IRC | 09:24 | |
*** flox|away has quit IRC | 10:07 | |
*** jan_s has quit IRC | 10:10 | |
*** d2m has joined #zope3-dev | 10:16 | |
*** MJ has joined #zope3-dev | 10:17 | |
*** flox has joined #zope3-dev | 10:20 | |
*** flox is now known as flox|away | 10:20 | |
*** MJ has quit IRC | 10:42 | |
*** ktwilight_ has joined #zope3-dev | 10:46 | |
*** MJ has joined #zope3-dev | 10:47 | |
*** ktwilight has quit IRC | 10:49 | |
*** ktwilight_ has quit IRC | 10:53 | |
*** ktwilight has joined #zope3-dev | 10:57 | |
*** MJ has quit IRC | 10:59 | |
*** MJ has joined #zope3-dev | 11:00 | |
*** MJ has quit IRC | 11:18 | |
*** philiKON has joined #zope3-dev | 11:54 | |
*** stub has joined #zope3-dev | 12:04 | |
*** MJ has joined #zope3-dev | 12:05 | |
*** kobold has joined #zope3-dev | 12:07 | |
*** stub has quit IRC | 12:12 | |
*** MJ has joined #zope3-dev | 12:16 | |
*** vlado has joined #zope3-dev | 12:55 | |
*** MJ has quit IRC | 12:55 | |
*** MJ has joined #zope3-dev | 12:56 | |
*** dunny has quit IRC | 13:00 | |
*** projekt01 has joined #zope3-dev | 13:15 | |
*** jinty has joined #zope3-dev | 13:20 | |
*** yota has joined #zope3-dev | 13:29 | |
flox|away | zc.* things are available under ZVSL? | 13:32 |
*** flox|away is now known as flox | 13:32 | |
flox | http://svn.zope.org/zc.comment/trunk/src/zc/comment/__init__.py?view=markup | 13:33 |
philiKON | they should be ZPL | 13:34 |
philiKON | probably an oversight | 13:34 |
flox | thanks | 13:34 |
philiKON | flox, i suggest you reply to gary poster's email and ask him | 13:35 |
philiKON | that way they'll know and can change it | 13:35 |
flox | ok. probably, after lunch | 13:39 |
*** flox is now known as flox|away | 14:12 | |
*** harobed has joined #zope3-dev | 14:39 | |
*** philiKON has quit IRC | 14:41 | |
*** philiKON has joined #zope3-dev | 14:43 | |
*** BjornT has quit IRC | 14:53 | |
*** BjornT has joined #zope3-dev | 14:58 | |
*** MJ has quit IRC | 15:11 | |
*** MJ has joined #zope3-dev | 15:13 | |
*** J1m has joined #zope3-dev | 15:24 | |
*** rocky|Zzz is now known as rocky | 15:44 | |
*** jinty has quit IRC | 16:18 | |
*** benji has joined #zope3-dev | 16:53 | |
*** MJ has quit IRC | 16:54 | |
*** MJ has joined #zope3-dev | 16:55 | |
*** harobed has quit IRC | 17:08 | |
*** J1m_ has joined #zope3-dev | 17:34 | |
*** kobold has quit IRC | 17:35 | |
*** J1m has quit IRC | 17:40 | |
*** niemeyer has joined #zope3-dev | 17:54 | |
*** J1m_ has quit IRC | 18:14 | |
*** povbot has joined #zope3-dev | 18:24 | |
*** alecm has joined #zope3-dev | 18:34 | |
*** Aiste has quit IRC | 18:47 | |
*** niemeyer has quit IRC | 18:58 | |
*** projekt01 has quit IRC | 19:06 | |
*** torkel_ has joined #zope3-dev | 19:07 | |
*** projekt01 has joined #zope3-dev | 19:07 | |
*** torkel_ has quit IRC | 19:10 | |
*** torkel_ has joined #zope3-dev | 19:11 | |
*** srichter has joined #zope3-dev | 19:16 | |
*** srichter has quit IRC | 19:16 | |
*** srichter has joined #zope3-dev | 19:17 | |
*** ChanServ sets mode: +o srichter | 19:17 | |
*** projekt01 has left #zope3-dev | 19:19 | |
*** projekt01 has joined #zope3-dev | 19:19 | |
*** projekt01 has joined #zope3-dev | 19:20 | |
*** projekt01 has quit IRC | 19:27 | |
*** _torkel has joined #zope3-dev | 19:34 | |
*** torkel_ has quit IRC | 19:34 | |
*** alecm is now known as alecm|away | 19:43 | |
*** MJ has quit IRC | 19:48 | |
*** optilude has joined #zope3-dev | 19:48 | |
*** harobed has joined #zope3-dev | 20:13 | |
*** jinty has joined #zope3-dev | 20:32 | |
*** alecm|away is now known as alecm | 20:34 | |
*** optilude has quit IRC | 20:51 | |
philiKON | gah | 20:56 |
philiKON | python's relative imports suck | 20:56 |
*** dunny has joined #zope3-dev | 20:58 | |
*** micktwomey has joined #zope3-dev | 21:07 | |
*** Aiste has joined #zope3-dev | 21:13 | |
*** MJ has joined #zope3-dev | 21:31 | |
*** tav has joined #zope3-dev | 21:32 | |
*** ChanServ sets mode: +o tav | 21:32 | |
tav | wow, the channel has grown | 21:32 |
* tav waves | 21:32 | |
sivang | philiKON: what do you mean "relative" import? import without full paths ? | 21:34 |
philiKON | hi tav | 21:34 |
philiKON | sivang, yep | 21:34 |
philiKON | well, local modules can shadow global packages | 21:35 |
sivang | philiKON: ah :-) | 21:35 |
sivang | philiKON: ah, right | 21:35 |
philiKON | e.g. zope.app.keyreference.persistent shadows persistent | 21:35 |
philiKON | there's no way to get at the persistent package from anywhere in zope.app.keyreference | 21:35 |
sivang | philiKON: there a persisten in python stdlib ? | 21:35 |
philiKON | sivang, no, it's a package from ZODB | 21:36 |
sivang | philiKON: ah, I see, which is defined in a higher level of the tree? | 21:36 |
philiKON | well, root | 21:36 |
philiKON | import persistent | 21:36 |
sivang | philiKON: isn't there a way to specify from where to import it? or you can addpath or something to change the search path order no? | 21:37 |
philiKON | nope | 21:37 |
sivang | hmmm bad | 21:37 |
philiKON | well, sys.modules['persistent'] | 21:37 |
philiKON | but that sucks | 21:37 |
sivang | right, it looks odd if found in a bunch of regular imports chunk | 21:37 |
philiKON | yup | 21:37 |
philiKON | anyways, it's getting fixed in py3k | 21:37 |
philiKON | py2.5 already supports relative imports | 21:38 |
philiKON | import .persistent | 21:38 |
sivang | ah cool | 21:38 |
sivang | that would look much more consistent | 21:38 |
philiKON | yup | 21:39 |
*** optilude has joined #zope3-dev | 21:39 | |
sivang | philiKON: btw, I've reached the section about TAL and TALES, and wel, although your book might be targetted to the more experinece zopers, I find it a bit difficult to disambiguite some of the replace, contnet, and condition explenations there. | 21:39 |
philiKON | hmm. can you be more specific? | 21:40 |
sivang | philiKON: sure, let me poke inside the chapetr. sec | 21:40 |
sivang | philiKON: you should also know that the book is one of the most enjoying ones I had pleasure in reading lately :-) | 21:41 |
philiKON | wow. thanks | 21:41 |
philiKON | i'm very glad you enjoyed it | 21:41 |
philiKON | i think you'll enjoy the 2nd edition even more then | 21:41 |
philiKON | :) | 21:41 |
sivang | I really like the "let the reader confornt it and think up himself before serving in a spoon" | 21:41 |
sivang | you're basically teaching folks to "think the open source way" | 21:41 |
sivang | for approaching , development that is. | 21:42 |
philiKON | well, i'd more call it the python way | 21:42 |
sivang | philiKON: Is there a program for getting subsquent editions for free and providing errta and fixes as payment? ;-) | 21:42 |
philiKON | i've been thinking of such a program | 21:42 |
sivang | Where do I sign? where do I sign?! :-) | 21:43 |
philiKON | it won't be direclty related to the book | 21:43 |
philiKON | but there'll be a program. perhaps. :) | 21:43 |
philiKON | i need to finish the book first | 21:43 |
philiKON | ther eisn't something like the pre-reading program like with o'reilly | 21:43 |
sivang | I see | 21:43 |
philiKON | sorry :( | 21:44 |
sivang | Nahh, it's okay. | 21:44 |
philiKON | i'm glad this really really small (in terms of sold copies) book is actually getting published at all | 21:44 |
sivang | Why small in copies? are there others course alike books like this on the subejct? | 21:44 |
philiKON | well, 1500 copies is a small book in the IT world | 21:45 |
philiKON | standard is >10000 | 21:45 |
philiKON | which i'm sure all those RoR books produce | 21:45 |
sivang | sure you have the free materilal on the web, but not too much have this similar structure, prehaps maybe expect DIP | 21:45 |
philiKON | zope 3 just doesn't give as much | 21:46 |
sivang | RoR ? | 21:46 |
philiKON | ruby on rails | 21:46 |
sivang | ah, RoR... | 21:46 |
sivang | I've looked at some RoR code, and I tell ya, even though you can probably write readable code using it, I can't say it has too much attraction for someone looking for simplicity coding...But I may be lacking experience in RoR to tell, Just a feeling. | 21:48 |
sivang | the bits I | 21:48 |
philiKON | i share that impression | 21:48 |
sivang | I've looked at, look all, how to say? complicated. | 21:48 |
philiKON | i read an RoR tutorial ages ago | 21:48 |
philiKON | for me it's hard to get used to the meaning of @, $, <, >, :, etc. | 21:49 |
sivang | exactly. It's like taking you back to the perl days or so... | 21:49 |
philiKON | yeah | 21:49 |
philiKON | then again, python has a meaniing for : | 21:49 |
philiKON | and nowadays even one for @ | 21:49 |
philiKON | i was against @ :) | 21:50 |
sivang | right, decorated functions or something ? | 21:50 |
philiKON | yup | 21:50 |
sivang | is there a way for achiving the same functionality as decorated functions without the char? | 21:50 |
philiKON | sure | 21:51 |
philiKON | @A | 21:51 |
philiKON | def foo(): | 21:51 |
philiKON | pass | 21:51 |
philiKON | is the same as: | 21:51 |
philiKON | def foo(): | 21:51 |
philiKON | pass | 21:51 |
philiKON | foo = A(foo) | 21:51 |
sivang | so that's defining a new object, basing on the foo as parent. Which "inherits" the previous attributes, being the referenced code? | 21:52 |
philiKON | well, actually, it just calls A with foo as argument | 21:53 |
philiKON | and takes the return value as the new foo | 21:53 |
philiKON | A can be anything | 21:53 |
philiKON | def A(f): return f | 21:53 |
philiKON | that'd be a null-decorator | 21:53 |
philiKON | wouldn't do anything | 21:53 |
philiKON | there can be lots more | 21:53 |
philiKON | you can write your own, obviously | 21:53 |
philiKON | just need something that's callable, takes an argument and returns something | 21:54 |
sivang | is it sensible to have it return f + 1 for example ? | 21:54 |
philiKON | well, what's a function +1 ? | 21:54 |
sivang | ah, so it returns the reference to the function, not the value the function returned | 21:54 |
sivang | I got confused, sorry. | 21:54 |
philiKON | yeah, they're not easy | 21:55 |
philiKON | (decorators) | 21:55 |
sivang | I will do some reading about them, they feel like something you should know if you want to do advanced pythoning. | 21:55 |
sivang | anyways, in page 85 | 21:55 |
sivang | you have some examples of TALES | 21:55 |
sivang | sorry, page 86 | 21:56 |
philiKON | ok | 21:56 |
sivang | the nocall explenatoins | 21:56 |
philiKON | what about it? | 21:57 |
sivang | It's not easy to understand (at least wasn't for me) if pop is like a variable, which gets the value from whatever comes afterwards until it hits the ';' | 21:57 |
sivang | so pop gets the reference to recipe.indgridients.pop ? | 21:57 |
philiKON | in python, that code would be: | 21:57 |
philiKON | pop = recipe.ingredients.pop | 21:57 |
philiKON | lastitem = pop() | 21:57 |
sivang | ah | 21:58 |
sivang | so spaces are like ='s ? | 21:59 |
philiKON | yeah, sort of | 21:59 |
philiKON | in tal:define and tal:attributes | 21:59 |
sivang | okay, and in tal:repeat they are like "for a in b" | 22:00 |
sivang | ? | 22:00 |
philiKON | right | 22:00 |
sivang | now there was something about content , I'm finding it in a sec. | 22:01 |
sivang | okay, again in page 86, the example about strcuture. | 22:02 |
sivang | could you do a trans;lation to python again from that snippet? :-) | 22:02 |
philiKON | i can't really | 22:02 |
philiKON | normally, HTML code is escaped when inserted | 22:03 |
philiKON | so, let's say i want to insert the foo variable into zpt | 22:03 |
philiKON | tal:content="foo" | 22:03 |
philiKON | that's perhaps equivalent to | 22:03 |
philiKON | print cgi.escape(foo) | 22:03 |
philiKON | when i say | 22:03 |
philiKON | tal:content="structure foo" | 22:03 |
philiKON | that's equivalent to just | 22:03 |
philiKON | print foo | 22:03 |
philiKON | (no escaping) | 22:04 |
sivang | ah, I se | 22:04 |
* philiKON work | 22:05 | |
*** romanofski has joined #zope3-dev | 22:15 | |
*** alecm has quit IRC | 22:28 | |
*** micktwomey has quit IRC | 22:31 | |
*** WebMaven has quit IRC | 22:36 | |
*** batlogg_ has joined #zope3-dev | 22:52 | |
*** batlogg has quit IRC | 22:58 | |
*** batlogg has joined #zope3-dev | 23:13 | |
*** batlogg_ has quit IRC | 23:14 | |
*** philiKON has quit IRC | 23:42 | |
*** philiKON has joined #zope3-dev | 23:51 |
Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!