*** RaFromBRC has joined #zope3-dev | 00:02 | |
*** RaFromBRC has quit IRC | 00:05 | |
*** edgordon has joined #zope3-dev | 00:16 | |
*** natea_ has quit IRC | 00:18 | |
*** philiKON has joined #zope3-dev | 00:21 | |
*** schwendinger has quit IRC | 00:22 | |
*** batlogg has quit IRC | 00:22 | |
*** ianbicking has quit IRC | 00:23 | |
*** g_n_o_s_i_s has joined #Zope3-dev | 00:30 | |
g_n_o_s_i_s | afternoon all | 00:31 |
---|---|---|
g_n_o_s_i_s | can anyone tell me how to setup a menu item to only show for an unauthenticated user? | 00:32 |
Theuni | i think you might be able to use a condition for that | 00:32 |
Theuni | do menuitems have conditions? i think i saw something like that. | 00:32 |
philiKON | they have a filter | 00:32 |
g_n_o_s_i_s | i'm not talking the add menu... a page added to the zmi_views | 00:32 |
philiKON | ? | 00:33 |
g_n_o_s_i_s | so it would be on the <page..... with menu=zmi_views title=register | 00:33 |
g_n_o_s_i_s | didn't see any filters in the zcml referece to <browser:page> | 00:33 |
philiKON | use <browser:menuItem /> | 00:34 |
philiKON | still, i would do it via the permission | 00:34 |
philiKON | use a permission on the menu item that an unauthenticate duser won't have | 00:34 |
g_n_o_s_i_s | i want it for the unauthenticated user... i want it to be gone for anyone taht is authenticated | 00:35 |
philiKON | you can do that too | 00:35 |
g_n_o_s_i_s | how? | 00:35 |
philiKON | i just told you | 00:35 |
g_n_o_s_i_s | do i need to define a permission for principal zope.anybody? | 00:35 |
philiKON | give one the permission and the other one not | 00:35 |
philiKON | you define a pmerission, then you grant it to zope.anybody | 00:36 |
philiKON | but not to anyone else | 00:36 |
g_n_o_s_i_s | ok... that is what i needed | 00:36 |
g_n_o_s_i_s | thanks | 00:36 |
*** edgordon has quit IRC | 00:38 | |
g_n_o_s_i_s | yes!!!!, thanks philiKON | 00:41 |
*** projekt01 has left #zope3-dev | 00:41 | |
*** RaFromBRC has joined #zope3-dev | 00:47 | |
*** BjornT has quit IRC | 00:49 | |
*** BjornT has joined #zope3-dev | 00:49 | |
*** RaFromBRC is now known as RaFromBRC|afk | 00:50 | |
*** ktwilight has quit IRC | 00:53 | |
*** benji has quit IRC | 00:54 | |
*** gumpa has left #zope3-dev | 00:54 | |
*** timte has quit IRC | 00:56 | |
*** RaFromBRC|afk is now known as RaFromBRC | 01:02 | |
*** g_n_o_s_i_s has quit IRC | 01:05 | |
*** ktwilight has joined #zope3-dev | 01:17 | |
*** RaFromBRC has quit IRC | 01:34 | |
*** RaFromBRC has joined #zope3-dev | 01:38 | |
*** febb has joined #zope3-dev | 01:45 | |
febb | Hola !! hi all ! | 01:45 |
*** RaFromBRC has quit IRC | 01:46 | |
*** yota has quit IRC | 01:47 | |
*** RaFromBRC has joined #zope3-dev | 01:49 | |
*** J1m has quit IRC | 02:04 | |
*** philiKON has quit IRC | 02:07 | |
*** febb has quit IRC | 02:13 | |
*** RaFromBRC has quit IRC | 02:25 | |
*** RaFromBRC has joined #zope3-dev | 02:27 | |
*** whit has joined #zope3-dev | 02:29 | |
*** whit has quit IRC | 02:31 | |
*** RaFromBRC has quit IRC | 02:36 | |
*** edgordon has joined #zope3-dev | 02:44 | |
*** niemeyer has joined #zope3-dev | 03:07 | |
*** edgordon has quit IRC | 03:10 | |
*** nathany has quit IRC | 03:19 | |
*** alecm has quit IRC | 03:20 | |
*** whit has joined #zope3-dev | 03:21 | |
*** wrobel has quit IRC | 03:29 | |
runyaga | hey | 03:35 |
runyaga | is 304 expensive to compute in z3 land? | 03:35 |
*** RaFromBRC has joined #zope3-dev | 03:39 | |
*** replicant has quit IRC | 03:42 | |
*** runyaga_ has joined #zope3-dev | 03:52 | |
*** hazmat has quit IRC | 03:53 | |
*** RaFromBRC has quit IRC | 03:56 | |
*** RaFromBRC has joined #zope3-dev | 03:56 | |
*** alga has quit IRC | 03:56 | |
*** runyaga has quit IRC | 04:05 | |
*** niemeyer has quit IRC | 04:14 | |
*** whit has quit IRC | 04:22 | |
*** whit has joined #zope3-dev | 04:39 | |
*** RaFromBRC has quit IRC | 04:57 | |
*** markup_ has quit IRC | 05:05 | |
*** RaFromBRC has joined #zope3-dev | 05:18 | |
*** ofer has quit IRC | 05:20 | |
*** jinty has quit IRC | 05:41 | |
*** stub has joined #zope3-dev | 06:00 | |
*** baijum has joined #zope3-dev | 06:32 | |
*** dobee has joined #zope3-dev | 06:41 | |
*** RaFromBRC has quit IRC | 06:57 | |
*** alecm has joined #zope3-dev | 07:32 | |
*** alecm has quit IRC | 07:37 | |
*** alecm has joined #zope3-dev | 07:44 | |
*** Aiste has joined #zope3-dev | 07:47 | |
*** SmokeyD has quit IRC | 07:53 | |
*** eins has joined #zope3-dev | 08:01 | |
eins | hi | 08:01 |
*** Aiste has quit IRC | 08:09 | |
*** febb has joined #zope3-dev | 08:10 | |
*** dobee has quit IRC | 08:11 | |
*** timte has joined #zope3-dev | 08:27 | |
*** d2m has left #zope3-dev | 08:42 | |
*** dobee has joined #zope3-dev | 08:45 | |
*** alecm has quit IRC | 08:50 | |
*** alecm has joined #zope3-dev | 08:52 | |
*** dobee has quit IRC | 08:52 | |
*** dobee has joined #zope3-dev | 08:53 | |
*** d2m has joined #zope3-dev | 08:53 | |
*** zagy has joined #zope3-dev | 09:00 | |
*** RaFromBRC has joined #zope3-dev | 09:12 | |
*** hdima has joined #zope3-dev | 09:18 | |
*** Aiste has joined #zope3-dev | 09:22 | |
*** romanofski has quit IRC | 09:23 | |
*** romanofski has joined #zope3-dev | 09:24 | |
romanofski | morjens | 09:29 |
*** flox has quit IRC | 09:29 | |
*** febb has quit IRC | 09:38 | |
*** wrobel has joined #zope3-dev | 09:40 | |
*** febb has joined #zope3-dev | 09:44 | |
*** batlogg_ has joined #zope3-dev | 09:49 | |
*** SmokeyD has joined #zope3-dev | 09:54 | |
*** schwendinger has joined #zope3-dev | 09:58 | |
*** yota has joined #zope3-dev | 10:12 | |
*** flox has joined #zope3-dev | 10:13 | |
*** febb has quit IRC | 10:22 | |
*** baijum has quit IRC | 10:28 | |
*** baijum has joined #zope3-dev | 10:32 | |
*** philiKON has joined #zope3-dev | 10:35 | |
*** kobol1 has joined #zope3-dev | 10:44 | |
*** hazmat has joined #zope3-dev | 10:44 | |
*** ChanServ sets mode: +o hazmat | 10:44 | |
*** alecm has quit IRC | 10:47 | |
*** MJ has quit IRC | 10:52 | |
*** yotaff has joined #zope3-dev | 10:56 | |
*** flox has quit IRC | 11:07 | |
*** b_52CEntos has joined #zope3-dev | 11:07 | |
*** flox has joined #zope3-dev | 11:26 | |
*** romanofs1i has joined #zope3-dev | 11:28 | |
*** romanofski has quit IRC | 11:31 | |
*** MJ has joined #zope3-dev | 11:31 | |
*** romanofs1i is now known as romanofski | 11:32 | |
*** faassen has joined #zope3-dev | 11:58 | |
*** baijum_ has joined #zope3-dev | 12:02 | |
*** volvox has joined #zope3-dev | 12:13 | |
*** baijum has quit IRC | 12:14 | |
*** ofer has joined #zope3-dev | 12:15 | |
*** flox has quit IRC | 12:16 | |
*** b_52CEntos has quit IRC | 12:21 | |
*** baijum_ is now known as baijum | 12:30 | |
*** andrew_m has joined #zope3-dev | 12:38 | |
*** andrew_m has quit IRC | 12:39 | |
*** flox has joined #zope3-dev | 13:22 | |
*** rocky has quit IRC | 13:42 | |
*** mkerrin has joined #zope3-dev | 13:47 | |
*** dunny has quit IRC | 13:58 | |
*** jinty has joined #zope3-dev | 14:04 | |
*** edgordon has joined #zope3-dev | 14:12 | |
*** J1m has joined #zope3-dev | 14:18 | |
*** ofer has quit IRC | 14:21 | |
*** ChrisW_ has joined #zope3-dev | 14:23 | |
*** ChrisW_ has quit IRC | 14:23 | |
*** ChrisW_ has joined #zope3-dev | 14:23 | |
*** ChrisW_ is now known as ChrisW | 14:24 | |
ChrisW | is there any way to register a teardown method for a DocFileSuite? I'm creating some temp files that I need to get rid of... | 14:25 |
*** mgedmin has joined #zope3-dev | 14:25 | |
philiKON | ChrisW, DocFileSuite(..., tearDown=myTearDown) | 14:28 |
philiKON | see Zope3/dut.py | 14:29 |
ChrisW | cool, thanks, just rtfm'ing :-) | 14:29 |
ChrisW | not used to code actually being documented ;-) | 14:29 |
philiKON | yeah, i refrained from rtfming you this time :) | 14:29 |
philiKON | ChrisW, you gotta stop complaining about code being documented... | 14:29 |
*** edgordon has quit IRC | 14:30 | |
eins | I want to use multiple schemas in forms using formlib. however some fields have the same name and zope complains with ValueError: ('Duplicate name', blah blah). what do I do? | 14:34 |
mgedmin | you could have two sets of form fields, with different prefixes, I suppose | 14:38 |
mgedmin | I think you can do form_fields = form.Fields(IFoo, prefix='foo') + form.Fields(IBar, prefix='bar') | 14:38 |
mgedmin | but I'm not entirely sure | 14:39 |
* mgedmin found that reading the source code of zope.formlib often helps, when the documentation is too scarce | 14:39 | |
eins | thanks, i'll try that | 14:39 |
*** jinty has quit IRC | 14:40 | |
philiKON | mgedmin, the prefix="" option to form.Fields is buggy, btw | 14:42 |
philiKON | i meant to file a bug report for that | 14:42 |
mgedmin | yay, joy | 14:42 |
philiKON | well, it's functional | 14:42 |
* mgedmin is confused | 14:42 | |
philiKON | but the form ids it creates are funny | 14:42 |
mgedmin | would it have anything to do with trailing periods? | 14:42 |
philiKON | first field will be | 14:42 |
philiKON | prefix.field | 14:42 |
philiKON | second field will be | 14:42 |
philiKON | prefix.prefix.field2 | 14:43 |
mgedmin | ahh | 14:43 |
philiKON | then prefix.prefix.prefix.field3 | 14:43 |
mgedmin | I think I saw that once | 14:43 |
philiKON | etc. | 14:43 |
*** jinty has joined #zope3-dev | 14:43 | |
* baijum added this formlib question to http://kpug.zwiki.org/Zope3Faq | 14:46 | |
eins | right, it has that bug philiKON | 14:47 |
eins | form.abc.abc.abc.warehouseLocation, form.abc.abc.abc.abc.webServicesURL, and so on | 14:48 |
philiKON | eins, file a bug report please :) | 14:48 |
* eins is looking at formlib code, maybe it's a minor one | 14:49 | |
philiKON | eins, yup, bug report + patch is always appreciated :) | 14:49 |
philiKON | eins, esp. if the patch has a teset | 14:50 |
*** niemeyer has joined #zope3-dev | 14:50 | |
eins | sure;) | 14:50 |
*** ignas has joined #zope3-dev | 14:54 | |
*** baijum has quit IRC | 14:58 | |
*** regebro has joined #zope3-dev | 14:59 | |
*** edgordon has joined #zope3-dev | 14:59 | |
*** baijum has joined #zope3-dev | 15:00 | |
*** edgordon has quit IRC | 15:01 | |
*** edgordon has joined #zope3-dev | 15:01 | |
*** baijum has quit IRC | 15:04 | |
*** baijum has joined #zope3-dev | 15:06 | |
*** nathany has joined #zope3-dev | 15:15 | |
*** baijum has joined #zope3-dev | 15:16 | |
*** batlogg_ has quit IRC | 15:24 | |
*** schwendinger has quit IRC | 15:25 | |
*** niemeyer has quit IRC | 15:27 | |
*** batlogg has joined #zope3-dev | 15:28 | |
*** niemeyer has joined #zope3-dev | 15:30 | |
*** whit has quit IRC | 15:32 | |
*** Aiste has quit IRC | 15:33 | |
*** benji has joined #zope3-dev | 15:36 | |
*** schwendinger has joined #zope3-dev | 15:40 | |
*** hazmat has quit IRC | 16:02 | |
* baijum thinks to split up the book : http://kpug.zwiki.org/ZopeGuideSandboxBaijuMuthukadan | 16:12 | |
*** edgordon has quit IRC | 16:16 | |
*** volvox has quit IRC | 16:25 | |
*** gumpa has joined #zope3-dev | 16:27 | |
*** stub has quit IRC | 16:28 | |
*** benji has quit IRC | 16:37 | |
*** torkel_ has joined #zope3-dev | 16:38 | |
*** benji has joined #zope3-dev | 16:38 | |
*** eins has quit IRC | 16:40 | |
*** mgedmin has quit IRC | 16:41 | |
*** whit has joined #zope3-dev | 16:45 | |
*** mgedmin has joined #zope3-dev | 16:53 | |
*** whit_ has joined #zope3-dev | 16:54 | |
*** baijum has quit IRC | 17:05 | |
*** srichter has joined #zope3-dev | 17:07 | |
*** ChanServ sets mode: +o srichter | 17:07 | |
*** whit has quit IRC | 17:08 | |
*** Aiste has joined #zope3-dev | 17:09 | |
*** whit_ has quit IRC | 17:14 | |
*** flox has quit IRC | 17:19 | |
*** tfws has joined #zope3-dev | 17:23 | |
*** tfws has quit IRC | 17:39 | |
*** hdima has quit IRC | 17:40 | |
*** tfws has joined #zope3-dev | 17:41 | |
*** gumpa has quit IRC | 17:46 | |
*** gump1 has joined #zope3-dev | 17:46 | |
*** gump1 is now known as gumpa_afk | 17:54 | |
*** zagy has quit IRC | 18:07 | |
*** gumpa_afk has quit IRC | 18:13 | |
*** gumpa has joined #zope3-dev | 18:13 | |
*** dobee has quit IRC | 18:14 | |
*** alecm has joined #zope3-dev | 18:35 | |
*** philiKON has quit IRC | 19:03 | |
*** MJ has quit IRC | 19:09 | |
*** zagy has joined #zope3-dev | 19:12 | |
*** norro has joined #zope3-dev | 19:21 | |
*** batlogg has quit IRC | 19:21 | |
*** romanofski has quit IRC | 19:22 | |
*** volvox has joined #zope3-dev | 19:30 | |
*** markup_ has joined #zope3-dev | 19:36 | |
*** runyaga_ has quit IRC | 19:44 | |
*** Aiste has quit IRC | 19:45 | |
*** philiKON has joined #zope3-dev | 19:52 | |
*** volvox has quit IRC | 19:54 | |
*** MJ has joined #zope3-dev | 19:54 | |
*** hazmat has joined #zope3-dev | 19:56 | |
*** ChanServ sets mode: +o hazmat | 19:56 | |
J1m | philiKON: could you set up the 3.3.0c1 release on www.zope.org? | 20:02 |
J1m | I have a source release. | 20:02 |
philiKON | J1m, will do | 20:02 |
J1m | I'm about to start working on the windows release. | 20:02 |
philiKON | awesome | 20:02 |
philiKON | J1m, http://www.zope.org/Products/Zope3/3.3.0c1/folder_contents | 20:05 |
J1m | k | 20:06 |
J1m | I'm not going to upload the source release until I test the windows release. | 20:06 |
*** ChrisW has left #zope3-dev | 20:07 | |
philiKON | J1m, ok. lemme know. | 20:07 |
philiKON | i'll work on the announcements | 20:07 |
philiKON | J1m, srichter, who has the rights to the cheeseshop section for zope 3? | 20:08 |
*** andrew_m has joined #zope3-dev | 20:08 | |
J1m | Not me. :( | 20:09 |
philiKON | hm :( | 20:09 |
*** schwendinger has quit IRC | 20:10 | |
srichter | I do :-) | 20:11 |
philiKON | srichter, can you give me rights, too, plz? | 20:11 |
srichter | aehm, at least IU can upload Zope 3 releases | 20:11 |
philiKON | my cheeseshop login is philikon | 20:11 |
srichter | I am not aware about the section, but me or Fred did the first Zope 3 release | 20:11 |
*** hazmat has quit IRC | 20:12 | |
srichter | philiKON: what do I have to do? | 20:12 |
srichter | ok, I am the owner I see | 20:13 |
philiKON | srichter, go to Admin | 20:13 |
philiKON | where it says: | 20:13 |
philiKON | Package: admin | view | edit | files | PKG-INFO | 20:13 |
philiKON | (you click on 'admin') | 20:13 |
philiKON | and grant me maintainer role | 20:14 |
philiKON | me = philikon :) | 20:14 |
srichter | done | 20:14 |
philiKON | thx | 20:15 |
*** whit has joined #zope3-dev | 20:23 | |
*** whit has joined #zope3-dev | 20:23 | |
*** whit has quit IRC | 20:26 | |
*** ChrisW has joined #zope3-dev | 20:34 | |
ChrisW | hey all, if I'm developing a brand new thiungy for Zope 2, where should I import Persistent from? In Zope 2.9, can I use the Zope 3 one yet? if so, what is it? | 20:34 |
philiKON | persistent.Persistent | 20:35 |
philiKON | you can use that | 20:35 |
ChrisW | cool :-) | 20:35 |
philiKON | but only if you don't need ExtensionClass semantics | 20:35 |
ChrisW | I don't think I do... | 20:35 |
ChrisW | if fact, if I use persistent.Persistent, am I free to use properties? | 20:35 |
philiKON | yup | 20:36 |
philiKON | but you're free to use properties with extensionclass as well | 20:36 |
J1m | You can use properties in either case. | 20:36 |
philiKON | because since zope 2.8 they're new style | 20:36 |
ChrisW | ah, okay | 20:36 |
*** kobol1 has quit IRC | 20:36 | |
ChrisW | can I mix Acquisition.Implicit with persistent.Persistent? | 20:36 |
J1m | no | 20:36 |
philiKON | no | 20:36 |
ChrisW | :-( | 20:36 |
philiKON | ChrisW, Implicit is an ExtensionClass | 20:37 |
ChrisW | *sigh* | 20:37 |
ChrisW | right, but Zope 2's security is non-functional without Implicit | 20:37 |
ChrisW | (tried without, kept getting told I hadn't provided a usernaem or password) | 20:37 |
philiKON | actually, Explicit is enough | 20:37 |
philiKON | but yes, zope 2 security needs acquisition | 20:37 |
philiKON | i have a fix, but it's not ready yet | 20:37 |
ChrisW | yeah, Explicit it may well need, but that's stil lan ExtensionClass, no? | 20:38 |
philiKON | yeah, it is | 20:38 |
ChrisW | *sigh* | 20:38 |
philiKON | :( | 20:38 |
philiKON | zope 2... | 20:38 |
ChrisW | ok, what persistent should I use/ | 20:38 |
ChrisW | ? | 20:38 |
philiKON | Persistence.Persistence i guess | 20:38 |
philiKON | or whatever it was called | 20:38 |
ChrisW | How's Zope 3's webdav story nowadays? | 20:39 |
philiKON | apparently better when you use zope.webdav (optional) | 20:39 |
srichter | very, very good thanks to mkerrin :-) | 20:39 |
ChrisW | heh | 20:40 |
ChrisW | I wish I wasn't behind on this project, there's little reason to do it on Zoep 2 other than force of habit... | 20:40 |
ChrisW | ...the customer might shit bricks too, but not many ;-) | 20:40 |
ChrisW | I hope it'll be fun to see how comparatively easy it is to use twiddler in Zope 3 :-) | 20:41 |
philiKON | what's twiddler? | 20:42 |
ChrisW | like meld3 but with a more style-pedant author | 20:42 |
ChrisW | (ie: me ;-) ) | 20:42 |
ChrisW | oh, and pluggable input parsers, output renderers and filters | 20:42 |
philiKON | nice | 20:43 |
ChrisW | current have a plain text and html/xml input, unicode and email output renders, and an html quoting filter by default | 20:43 |
ChrisW | yeah, I've been keeping it under wraps for about 9 months now, but I wanna use it on this custoemr project | 20:43 |
ChrisW | hmm, there a pastbin around? I'll shwo you a snippet... | 20:44 |
* philiKON always uses http://paste.lisp.org | 20:44 | |
ChrisW | heh, trying pastebin.com now :-) | 20:45 |
ChrisW | heh | 20:46 |
ChrisW | http://paste.lisp.org/display/25904 | 20:46 |
ChrisW | I can even use icky dtml bits to build zmi pages ;-) | 20:47 |
ChrisW | ...although the plaintext parser makes it even less icky | 20:47 |
philiKON | cool | 20:47 |
ChrisW | the only confusing thing o nthere are the params to ZopeTwiddler's constructor | 20:47 |
ChrisW | (id,source,**kw) | 20:47 |
ChrisW | the id is to appease the Zope 2 gods | 20:48 |
ChrisW | the rest are as for a normal twiddler | 20:48 |
ChrisW | I'm really happy with out the FileWrapper input turned out | 20:48 |
ChrisW | no need for a seperate FileTwiddler or some such | 20:48 |
philiKON | what's FileWrapper do? | 20:49 |
ChrisW | it's an input that treats the source argument as a filename, reads it, and then parses it to the "real" input parser passed to its constructor | 20:49 |
ChrisW | in this case, PlainText | 20:49 |
philiKON | ok | 20:49 |
*** batlogg has joined #zope3-dev | 20:50 | |
ChrisW | I was trying to avoid a having the PageTemplate,ZopePageTemplate,PageTemplateFile triality :-) | 20:50 |
philiKON | yeah, makes sense | 20:50 |
ChrisW | I'm _very_ happy with how the pipelines input and output have turned out | 20:51 |
philiKON | in zope, you should look at ViewPageTemplateFile | 20:51 |
philiKON | in zope 3 that is | 20:51 |
ChrisW | *nods* | 20:51 |
philiKON | it's a good scheme to implement "methods" as a template | 20:51 |
philiKON | e.g.: | 20:51 |
philiKON | class FooPage(BrowserPage): | 20:51 |
philiKON | __call__ = ViewPageTempalteFile('foo.pt') | 20:51 |
philiKON | you can call a FooPage object and the template gets rendered | 20:51 |
ChrisW | sweet | 20:51 |
ChrisW | I think for me that'd be: | 20:52 |
philiKON | the trick is that the template has access to FooPage's request, etc. | 20:52 |
ChrisW | class FooPage(BrowserPage): | 20:52 |
ChrisW | __call__ = Twiddler('foo.twiddler',FileWrapper(prefix=__file__),executor=myCallable) | 20:53 |
ChrisW | ...which will work as-is :-) | 20:53 |
*** dunny has joined #zope3-dev | 20:53 | |
ChrisW | oops, forgot an input= before the FileWrapper | 20:53 |
philiKON | k | 20:53 |
ChrisW | ok, but how _do_ you get acccess to the request and other context? | 20:53 |
philiKON | note that Twidder has to be something that's callable by itself | 20:54 |
philiKON | yeah, that's the trick | 20:54 |
philiKON | Twiddler.__call__ won't get request and context | 20:54 |
philiKON | actually, you'd have something like | 20:54 |
philiKON | class FooPage(BrowserPage): | 20:54 |
ChrisW | good thing too, it wouldn't know what to do with them ;-) | 20:54 |
philiKON | __call__ = TwiddlerMethod(**kw) | 20:54 |
philiKON | and TwiddlerMethod is an property-style object | 20:54 |
ChrisW | property-style object? | 20:54 |
philiKON | on __get__, it fetches the page's context and request object, and returns a Twiddler object | 20:54 |
philiKON | you know, thos ethings with __get__ and __set__ | 20:55 |
philiKON | like: | 20:55 |
philiKON | class Foo(object): | 20:55 |
philiKON | @property | 20:55 |
philiKON | def bar(self): return 1 | 20:55 |
*** Aiste has joined #zope3-dev | 20:55 | |
ChrisW | ah, ok | 20:55 |
ChrisW | hmm, that''s probably be a Zope3Twiddler then ;-) | 20:55 |
ChrisW | sounds pretty sweet though :-) | 20:55 |
ChrisW | TTW Zope 3 Twiddlers will be fun too ;-) | 20:55 |
*** Aiste has quit IRC | 20:55 | |
philiKON | yes, look at ViewPageTemplateFile, it's a pretty powerful scheme | 20:56 |
*** srichter has quit IRC | 20:56 | |
ChrisW | shame there's a relaince on having a __call__ method | 20:56 |
mgedmin | why? | 20:56 |
philiKON | basically, a ViewPageTemplateFile object is just a surrogate which returns a "real", request-and-context-bound page template object upon __get__ | 20:56 |
ChrisW | Twiddler's only have a render method at present | 20:56 |
ChrisW | mmm | 20:56 |
ChrisW | maybe they should have a call method? | 20:57 |
mgedmin | ah | 20:57 |
mgedmin | well, very often you want to do more than just render a template | 20:57 |
mgedmin | my usual pattern is | 20:57 |
mgedmin | class SomeView(BrowserPage): | 20:57 |
mgedmin | template = ViewPageTemplateFile('templates/foo.pt') | 20:57 |
mgedmin | def __call__(self): | 20:57 |
mgedmin | self.update() | 20:57 |
mgedmin | return self.template() | 20:57 |
ChrisW | yeah, that's what I figured | 20:58 |
mgedmin | and sometimes I have more than one template with an if statement choosing which one should be rendered | 20:58 |
ChrisW | in fact, that suites twiddler even better | 20:58 |
ChrisW | class SomeView(BrowserPage): | 20:58 |
philiKON | yeah, but self.template is a Twiddler object | 20:58 |
philiKON | so, you'd have to say self.template.render() | 20:58 |
ChrisW | template = Twiddler('myfile.twiddler',input=FileWrapper(prefix=__file__)) | 20:58 |
ChrisW | def __call__(self): | 20:58 |
ChrisW | t = self.template.clone() | 20:59 |
ChrisW | t['some_id'].replace('my_value',style='font-weight: bold;') | 20:59 |
ChrisW | return t.render() | 20:59 |
ChrisW | ...if you see what I mean | 20:59 |
ChrisW | Twiddler's are like lumps of putty | 20:59 |
ChrisW | they don't have any "code" as such | 21:00 |
* philiKON sees what you mean | 21:00 | |
ChrisW | so actually, I think they'll be _ideal_ for Zope 3 :-) | 21:00 |
philiKON | :) | 21:00 |
philiKON | yes, i think twiddler fits into browserpages nicely | 21:00 |
ChrisW | funnilly enough, I started working o nthe m in January when I was going through your book and learnign Zope 3 for the first time | 21:00 |
philiKON | heh, cool | 21:01 |
*** faassen has quit IRC | 21:01 | |
ChrisW | that was when I finally snapped and thought "Zpt sux" | 21:01 |
ChrisW | ;-) | 21:01 |
ChrisW | templates should have no code | 21:01 |
ChrisW | although I allow code to be associated with a twiddler for execution at runtime | 21:01 |
philiKON | i still like the meld idea better | 21:01 |
ChrisW | what's the meld idea? | 21:01 |
philiKON | but i agree that twiddler is cool for non-xml data | 21:01 |
philiKON | well, meld is about modifying an xml tree, right? | 21:01 |
ChrisW | yeah | 21:02 |
ChrisW | so's twiddler ;-) | 21:02 |
philiKON | for markup, i like working on an elementtree | 21:02 |
philiKON | or something that like that | 21:02 |
* mgedmin sees 'meld', me thinks about the Gtk+ visual merge tool | 21:02 | |
ChrisW | er, twiddler uses elementree under the hood ;-) | 21:02 |
philiKON | nice :) | 21:02 |
philiKON | i gotta check this out then | 21:02 |
philiKON | is it on the cheeseshop? egg? | 21:02 |
philiKON | ah, wait, it's you :) | 21:02 |
philiKON | of course not | 21:02 |
ChrisW | t = Twiddler('<node id="fish">something</node>') | 21:02 |
ChrisW | t['fish'].replace('foo') | 21:02 |
* mgedmin likes zpts | 21:03 | |
ChrisW | t.render() -> u'<node id="fish">foo</node>' | 21:03 |
ChrisW | sadly nto released yet | 21:03 |
ChrisW | I'm very glad I waited | 21:03 |
ChrisW | I've changed the api a _lot_ in the last month or two | 21:03 |
philiKON | hehe | 21:03 |
philiKON | helloooo mr. "stop changing apis!" | 21:04 |
philiKON | :) | 21:04 |
ChrisW | yes, but these aren't released yet :-P | 21:04 |
ChrisW | hmmm, I'm now thinking of renaming 'render' to __call__ | 21:04 |
ChrisW | maybe just a synonim? | 21:05 |
ChrisW | Twiddler('<node id="fish">something</node>')() looks perverse to me :-S | 21:05 |
ChrisW | Twiddler('<node id="fish">something</node>').render() looks better | 21:05 |
ChrisW | that said, msg = t.render(), where msg ends up being a MIMEMultipart doesn't feel quite right either ;-) | 21:06 |
mgedmin | how often will you render a template immediately after constructing it? | 21:07 |
ChrisW | very true ;-) | 21:07 |
ChrisW | that said, I can't see any harm in having __call__ as a synonym for render | 21:07 |
mgedmin | synonym's aren't very pythonic -- There Should Be One Obvious Way To Do It | 21:09 |
mgedmin | formlib, I'm looking at you | 21:09 |
mgedmin | form.fields == form.Fields == form.FormFields | 21:09 |
ChrisW | blegh | 21:09 |
ChrisW | okay, I'll just stick with render for now ;-) | 21:09 |
ChrisW | philiKON: btw: I was very scared how close to meld3 I came having not even looked at it until I finished my 1st pass ;-) | 21:10 |
philiKON | hehe | 21:10 |
ChrisW | I did point this out at EPC | 21:10 |
* philiKON misses your talk due to hangover | 21:10 | |
ChrisW | the pipelines input was so I could do a plaintext parser and stop Guido's "I hate xml" whine ;-) | 21:11 |
ChrisW | but I _like_ the plaintext parser _a lot_ now, especially when generating email | 21:11 |
ChrisW | the output front was mainly for symetry, but having written the Email output renderer, I'm very glad I did | 21:11 |
mgedmin | ooh, generating JavaScript from ZPT *is* a pain | 21:11 |
ChrisW | the filters idea is borrowed from Django - makes html_quote and translation very easy to do :-) | 21:12 |
ChrisW | mgedmin: come to the twiddler side ;-) | 21:12 |
ChrisW | (it's not that dark here) | 21:12 |
ChrisW | *chuckles* | 21:12 |
ChrisW | it's all oss and I'm happy to mail .tgz's to anyone who's interested | 21:12 |
ChrisW | there's a raft of documentation | 21:13 |
ChrisW | just don't want torelease until I;'ve tidied a few things up... | 21:13 |
*** hazmat has joined #zope3-dev | 21:14 | |
*** ChanServ sets mode: +o hazmat | 21:14 | |
J1m | philiKON: the new release files have been uploaded | 21:18 |
philiKON | ook | 21:18 |
philiKON | cool | 21:18 |
J1m | I'll go ahead and publish them | 21:18 |
philiKON | ok | 21:19 |
J1m | It looks like the files are publicly available. | 21:20 |
philiKON | yup | 21:21 |
philiKON | thanks | 21:21 |
*** zagy_ has joined #zope3-dev | 21:22 | |
* Theuni claps in the hands | 21:22 | |
*** philiKON changes topic to "logs available at http://zope3.pov.lt/irclogs/ || paste code examples into http://zope3.pastebin.com/ or http://paste.plone.org/ || 3.3c1 is out || bug day live at http://www.zope.org/Collectors/Zope3-dev || FAQ at http://kpug.zwiki.org/Zope3Faq" | 21:23 | |
*** ignas has quit IRC | 21:25 | |
*** norro has quit IRC | 21:32 | |
*** zagy has quit IRC | 21:33 | |
philiKON | dang, srichter is gone | 21:37 |
philiKON | i don't seem to have cheeseshop privileges after all | 21:37 |
ChrisW | I should really look at the cheesshop sometime :_S | 21:38 |
philiKON | it's a pathetic web app | 21:39 |
ChrisW | that's why I've been avoiding it ;-) | 21:39 |
*** alecm is now known as alecm|away | 21:40 | |
*** mkerrin has quit IRC | 21:50 | |
*** rocky has joined #zope3-dev | 21:56 | |
*** rocky has quit IRC | 22:05 | |
*** rocky has joined #zope3-dev | 22:07 | |
*** ChrisW has quit IRC | 22:08 | |
*** faassen has joined #zope3-dev | 22:09 | |
*** rocky has quit IRC | 22:10 | |
*** rocky has joined #zope3-dev | 22:11 | |
*** hazmat has quit IRC | 22:24 | |
*** alecm|away is now known as alecm | 22:31 | |
*** rocky is now known as rocky|hereandthe | 22:33 | |
*** romanofski has joined #zope3-dev | 22:33 | |
*** rocky|hereandthe is now known as rocky|here|there | 22:33 | |
*** zagy_ has quit IRC | 22:50 | |
*** TresEquis has joined #zope3-dev | 22:54 | |
Theuni | J1m: Is it intentional that an adapter registration overwrites earlier registrations with the same triple of (required, provided, name)? | 22:57 |
*** alecm has quit IRC | 22:57 | |
*** ChrisW has joined #zope3-dev | 22:57 | |
J1m | Yes | 22:57 |
* Theuni humms | 22:58 | |
Theuni | Why? | 22:58 |
ChrisW | do Zope 3 security proxies work with Zope 2 security yet? | 22:58 |
J1m | ChrisW: no | 22:58 |
ChrisW | hurmph ;-) | 22:58 |
J1m | Theuni: because it's simpler. | 22:58 |
J1m | If you want conflict detection, you can write that on top, as we do w zcml. | 22:59 |
Theuni | but handlers don't work that way, right? | 22:59 |
J1m | You might as well ask why dictionary objects don't raise exceptions when you overwrite a key. | 22:59 |
*** hazmat has joined #zope3-dev | 22:59 | |
J1m | Handlers never conflict, so, of course, they don't so conflict detection. | 23:00 |
J1m | don't do | 23:00 |
Theuni | Ah. | 23:00 |
Theuni | So the reason is that we can't have two adapters with the same level of 'specificity' (is that a word?)? | 23:00 |
* mgedmin wants to ask why containers raise exceptions when you overwrite a key | 23:00 | |
J1m | I prefer to use the term "adapter type". | 23:01 |
J1m | where type is the required and provided interfaces. | 23:01 |
Theuni | ah, ok. so we can't have two adapters with the same adapter type, becauset the CA wouldn't know what to do. | 23:01 |
Theuni | (and the name?) | 23:01 |
J1m | You can't have 2 regular adapters of the same type and name. | 23:01 |
Theuni | ok | 23:02 |
J1m | right | 23:02 |
Theuni | and why don't we conflict on registry-level? | 23:02 |
J1m | mgedmin: containers are higher level. | 23:02 |
Theuni | why don't we force people to delete first? | 23:02 |
Theuni | s/delete/unregister/ | 23:02 |
J1m | why should we? | 23:02 |
*** gumpa has quit IRC | 23:03 | |
J1m | I don't remember atm what the registration UI does. | 23:03 |
*** gumpa has joined #zope3-dev | 23:03 | |
Theuni | well, the docstring for registerAdapter doesn't tell for example that a previous registration will be lost. i was kind of thinking registering an adapter and unregistering it again would get me the original state. | 23:03 |
*** rocky|here|there has quit IRC | 23:04 | |
Theuni | i was extrapolating from handlers i think | 23:04 |
*** nathany has quit IRC | 23:05 | |
*** alga has joined #zope3-dev | 23:05 | |
Theuni | i think the comparison of adapter registrations with dictionary keys is not *that* obvious | 23:05 |
* J1m shrugs | 23:07 | |
J1m | I think it makes a lot of sense to keep registration machinery as simple as possible. | 23:07 |
* Theuni wonders what the goal of that shrug was | 23:07 | |
J1m | That means the simplest or no policies. | 23:07 |
Theuni | I agree on that. | 23:07 |
J1m | If you want to protect people, then do it at a higher level. | 23:08 |
*** ChanServ sets mode: +o hazmat | 23:08 | |
Theuni | ok | 23:08 |
* Theuni needs to protect his functional test | 23:08 | |
J1m | For example, I made a bare bones UI for registering things locally. | 23:08 |
philiKON | where things is only utilities | 23:08 |
J1m | I'm sure it can be improved in many ways. | 23:08 |
Theuni | Right now I have a problem with test isolation again. | 23:08 |
* philiKON has adapters on his list ;) | 23:08 | |
J1m | philiKON: well, yes | 23:08 |
Theuni | One test registers (and unregisters) an adapter, and the next test fails. | 23:09 |
Theuni | because the original adapter is gone | 23:09 |
J1m | ah | 23:09 |
J1m | a functional test messes with the glbal registry at the next test's peril. :) | 23:09 |
J1m | why not use a local registry. | 23:10 |
J1m | ? | 23:10 |
J1m | They are very easy to use now. | 23:10 |
Theuni | looks like i'll do that | 23:10 |
philiKON | ftests should not modify the global registries IMO | 23:10 |
*** ChrisW has left #zope3-dev | 23:10 | |
Theuni | philiKON: tests should be isolated better | 23:10 |
philiKON | perhaps | 23:11 |
J1m | so write well-behaved tests. | 23:11 |
J1m | The testing infrastructure can only do so much. | 23:12 |
Theuni | I know. Unfortunately I keep expecting the wrong things. | 23:12 |
* mgedmin dreams a "what's new/cool in zope 3" blog with short code examples | 23:16 | |
* mgedmin should be forced to pay $1 for every wish/dream/whine he doesn't actually plan to implement | 23:20 | |
*** flox has joined #zope3-dev | 23:24 | |
*** gumpa has quit IRC | 23:27 | |
*** gump1 has joined #zope3-dev | 23:27 | |
*** zbir has quit IRC | 23:32 | |
*** mgedmin has quit IRC | 23:37 | |
*** febb has joined #zope3-dev | 23:37 | |
febb | hola... | 23:37 |
*** zbir has joined #zope3-dev | 23:43 | |
*** niemeyer has quit IRC | 23:47 | |
*** MJ has quit IRC | 23:51 |
Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!