IRC log of #zope3-dev for Sunday, 2007-02-18

*** nederhoed has left #zope3-dev00:01
*** nederhoed has joined #zope3-dev00:02
*** naro has quit IRC00:08
*** makkalot has joined #zope3-dev00:08
makkalothi I'm very new to zope3 framework and i visited for documentation,but i'm a little bit confused from where should i start?00:10
makkalotThere are aplenty of documents00:10
mgedminbenji's quick start guide is good00:14
makkaloti'm going to develop a iptables web interface do i should have deeper knowledge about zope?00:16
*** hazmat has joined #zope3-dev00:31
*** ChanServ sets mode: +o hazmat00:31
*** nederhoed has quit IRC00:39
makkalotmgedmin:it is very a really quickstart :), i think i need something deeper.How is this one : ?00:50
mgedminit's good00:50
mgedminmaybe somewhat outdated in some areas00:50
makkalotmgedmin: Could you offer me something you have read,i really should progress in a very short time?00:55
mgedminI mostly learned zope 3 by reading its source code :)00:56
mgedmin(and writing small parts of it)00:56
mgedminthere are some core ideas, like the component architecture00:56
mgedminand when you want specific details, the source is sometimes the only place to look00:57
makkalotOk i see, i will begin to learn the basic structure i hope i'll learn it because i have less than 3 months for my project,thanks again00:59
*** norro has joined #zope3-dev01:15
*** mgedmin has quit IRC01:18
*** makkalot has left #zope3-dev01:20
*** dobee has quit IRC01:42
*** norro has quit IRC02:10
*** harobed has quit IRC03:00
*** stub has joined #zope3-dev03:41
*** MiUlEr has quit IRC03:45
*** wrobel has quit IRC03:53
*** hazmat has quit IRC03:58
*** hazmat has joined #zope3-dev04:00
*** ChanServ sets mode: +o hazmat04:00
*** replicant has joined #zope3-dev04:06
*** hazmat has quit IRC04:06
*** replicant has quit IRC04:07
*** yota has quit IRC04:12
*** BjornT has quit IRC04:40
*** tonico|away has quit IRC04:40
*** BjornT has joined #zope3-dev04:41
*** tonico|away has joined #zope3-dev04:41
*** Bhaskar has joined #zope3-dev05:40
*** whit has joined #zope3-dev05:42
*** stu1 has joined #zope3-dev05:46
*** stub has quit IRC06:04
*** stu1 has quit IRC06:15
*** whit has quit IRC06:28
*** whit has joined #zope3-dev06:32
Bhaskar  Anybody : have you ecopy of Philip's  Zope 3 book (1st ed) in pdf format08:07
d2mBhaskar, there is no pdf existing from the book08:15
*** CSWookie has joined #zope3-dev08:20
*** Jell-O-Fishi has quit IRC08:48
CSWookieCan I not use a macro I defined earlier in the same template?09:02
d2mCSWookie, did you try use-macro="template/macros/macroname" ?09:03
CSWookied2m: No, I just used the name.  I'll try that.09:03
CSWookieI have a feeling this won't work...  I have no idea what the name of the template is.09:05
d2mtemplate is the zpt itself, its a bound name09:06
d2mtry verbose: use-macro="template/macros/your_macroname"09:06
CSWookied2m: Igot a keyerror when I tried that.09:07
CSWookieverbose?  OK.09:07
d2mkeyerror on 'template' ?09:07
d2mok, use a fully qualified name toi find the zpt itself, like use-macro="context/zptid/macros/macroname" ?09:08
CSWookieI'll have to go spelunking to try and figure out what the name of the template is.09:12
d2mbut template should not give you a keyerror, i'm shur edo have a syntax error09:13
*** Bhaskar has quit IRC09:14
d2mno, <metal:block define-macro="eins">1</metal:block><div metal:use-macro="template/macros/eins">2</div> works perfect09:14
CSWookieWell, it's giving a keyerror over here.  There's probably some special namespace or something going on.09:15
CSWookieI'll go spelunking and figure out what's going on.09:15
d2mwant to paste your template to a pastebin ?09:15
CSWookieI can't, or I would.09:15
d2mi see, we are in zope3-dev ;) need to reevaluate my hints09:16
d2mok, works inside a zope3.3.0-svn-trunk instance too09:18
d2mdid you try and copy the above snippet to a blank ZPT page ?09:19
CSWookieWe'll check and make triple sure.09:19
d2mok, really want to past the part of your code ?09:21
CSWookieI really can't.  I appreciate the offer to look, but *shrug*09:22
d2mwait, i do not understand - just pasting " <metal:block define-macro="eins">1</metal:block><div metal:use-macro="template/macros/eins">2</div> " to a zpt page and evaluating it getrs you a keyerror ?09:23
CSWookieI imagine theres some funky bug in this project that's causing the problem.09:23
CSWookieSpecifically on line 1 and column 4809:24
d2mline1 col 48 is where ?09:24
CSWookieBeginning of the div09:25
d2mok, add this into your url: http://localhost:8080/++skin++Debug/path/to/your/zpt09:27
d2mgets your a verbose traceback of the error09:28
CSWookieIf I'm already using a custom skin, can I use them both?09:28
CSWookieAnd if so, how?09:28
CSWookied2m: And is it more verbose than the error log in the zmi?09:29
CSWookieOr is that the same?09:29
d2mjust try  http://localhost:8080/++skin++Debug/path-to-the-test-zpt09:29
d2mno, if you can supply a copy of the error in a pastebin i'm ok too09:29
CSWookieI dunno if I can.  However, if template were a bound name, it would appear in tne Names dictionary in the traceback, no?09:33
d2mmaybe you changed the default traverser for zpts ?09:33
CSWookieI think in my particular case template is not bound.09:33
CSWookieYeah.  I'm pretty sure it's been changed.09:34
CSWookieEh.  I'll talk to the other guys about this later.  If it's a bug, it needs fixed.09:38
*** d2m_ has joined #zope3-dev10:05
*** d2m has quit IRC10:24
*** jkakar has quit IRC10:31
*** naro has joined #zope3-dev10:40
*** dobee has joined #zope3-dev10:43
*** pelle_ has joined #zope3-dev11:01
*** dobee has quit IRC11:01
*** dunny has quit IRC11:18
*** svenn has joined #zope3-dev11:46
*** ofer has joined #zope3-dev12:24
*** timte has joined #zope3-dev12:27
*** pelle_ has quit IRC12:33
*** ktwilight_ has joined #zope3-dev12:37
*** ktwilight has quit IRC12:44
*** ofer has quit IRC12:48
*** philiKON has joined #zope3-dev13:17
*** WebMaven has joined #zope3-dev13:18
WebMavensrichter: ayt13:19
*** svenn has quit IRC13:20
*** srichter has quit IRC13:34
*** philiKON_ has joined #zope3-dev13:44
*** philiKON has quit IRC13:44
*** nederhoed has joined #zope3-dev13:44
*** philiKON_ is now known as philiKON13:45
*** dobee has joined #zope3-dev13:58
*** srichter has joined #zope3-dev14:06
*** mgedmin has joined #zope3-dev14:21
*** dobee has quit IRC14:48
*** yvl has joined #zope3-dev15:03
*** pelle_ has joined #zope3-dev15:07
CSWookieIs there a way to define a macro without the template in it actually being executed?15:09
mgedmin<tal:block condition="nothing"><div metal:define-macro="foo">...</div></tal:block>15:09
CSWookieOK.  I thought that might be it, but I thought maybe the condition would keep the macro from being defined.  Thanks.15:10
mgedminthe interaction of tal and metal is rather tricky15:12
mgedminyou have to realize that there are two independent steps: first all metal directives get processed, then you get a page template with tal only, and that gets processed15:12
mgedminonce you figure that out, everything becomes clear15:12
mgedmine.g. how definitions trickle down from outside macros15:13
*** yvl has left #zope3-dev15:13
*** BjornT has quit IRC15:13
*** BjornT has joined #zope3-dev15:13
CSWookieSo metal always happens first?15:15
CSWookieSo they really are macros a la a C preprocessor?15:16
CSWookieOK.  that does clarify things.   I thought the whole macro thing was just an analogy.15:16
*** pelle_ has quit IRC15:18
CSWookieDoes fill-slot or use-macro happen first?15:19
philiKONwell, fill-slot only makes sense within a use-macro15:20
philiKONuse-macro takes the TAL bytecode from the original template and puts it into the code structure of the current one15:20
CSWookieRight.  I'm filling a slot by using a few macros.15:21
*** BjornT has quit IRC15:22
*** BjornT has joined #zope3-dev15:22
mgedminyou mean you have <div metal:fill-slot="foo" metal:use-macro="bar"> ?15:25
mgedmin(inside another use-macro)15:25
mgedminI think the order of interpretation is documented somewhere15:25
CSWookiemgedmin: Yes.  With the goal being to fill foo with bar.15:25
mgedminat least it was documented for TAL (tal:define first, tal:condition next, etc.)15:25
mgedminwhen in doubt, you can always force an explicit order by nesting fake elements15:26
mgedmin<tal:anyting>, <metal:anything>15:26
CSWookieIf the macros in question come from different templates, have you ever run into a problem with KeyErrors?  Like, <div metal:use-macro="other/macros/m1"><div metal:fill-slot="m1slot"><div metal:use-macro="template/macros/m2" /></div></div>  Yields a KeyError for m215:30
*** yota has joined #zope3-dev15:47
*** pelle_ has joined #zope3-dev15:52
*** natea has joined #zope3-dev16:25
*** philiKON has quit IRC16:31
*** jfroche has joined #zope3-dev16:32
*** d2m_ has quit IRC16:37
*** ChanServ sets mode: +o srichter16:38
*** natea has quit IRC16:46
*** bigkevmcd has joined #zope3-dev16:48
nederhoedhello, I succeeded in adding a form to my content object, by registering it as a page for the class in zcml16:53
nederhoedroughly following:16:53
nederhoedWhat I want is the form  beneath a view on my content on 1 page16:53
nederhoedhow can I merge a view and this form?16:54
nederhoedcan I let my own template extend for example?17:05
*** zagy has joined #zope3-dev17:10
mgedminnederhoed: in your form class (I assume you use formlib, right?) define a template attribute17:14
mgedmintemplate = ViewPageTemplateFile('')17:14
mgedminuse your view's .pt as foo.pt17:14
mgedminin it, add the necessary <form> ... </form> stuff with all the widgets17:15
mgedmin<div metal:use-macro="context/@@form_macros/widget_rows></div> should come in handy17:15
mgedminif I recall the syntax correctly17:15
mgedminyou can look at the to see what you need to render the widgets and actions17:15
nederhoedI'll do that17:16
nederhoedwhat do you mean with add the widgets, I defined them in an interface using schema...17:20
mgedminI mean you want the html to have all the <input> elements for your widgets17:22
mgedminso you need to include them in the page template17:22
mgedminwhich you can do by using the widget-rows macro17:22
nederhoed(still trying :) )17:47
nederhoedalmost there17:54
*** ofer has joined #zope3-dev17:58
nederhoedIf I could just use '' from my template, it would suffice18:02
mgedminyou can, with a little trickery18:03
mgedminin your class, say default_template = form.PageForm.template18:03
mgedminthen in your page template metal:use-macro="view/default_template/macros/form"18:04
nederhoedmerci merci, exactly what I wanted!18:07
*** J1m has joined #zope3-dev18:14
*** bigkevmcd has quit IRC18:19
*** bigkevmcd has joined #zope3-dev18:19
*** ignas has joined #zope3-dev18:37
nederhoedstrangely enough, the 'data' variable stays empty18:38
nederhoedafter submitting:18:39
nederhoeddata == {}18:39
nederhoedrequest.form == {u'reactie.comments': u'', u'reactie.actions.send': u'Send', u'reactie.subject': u''}18:39
mgedminin your action handler?18:40
mgedminwith formlib, it is the job of the validator to fill in the data dict18:41
mgedminif you haven't overridden the default validator, it should work fine18:42
mgedminif you have, you have to call form.getWidgetsData yourself18:42
nederhoedyou're a wizard, I actually did override the validator18:45
nederhoedmerci, that solved the puzzle18:47
*** J1m has quit IRC19:19
*** naro has quit IRC19:22
*** harobed has joined #zope3-dev19:34
*** norro has joined #zope3-dev19:41
*** makkalot has joined #zope3-dev19:48
*** naro has joined #zope3-dev19:53
*** philiKON has joined #zope3-dev20:01
*** SteveA_ has joined #zope3-dev20:05
*** SteveA_ has quit IRC20:05
*** witsch has joined #zope3-dev20:10
*** whit has quit IRC20:16
*** witsch has left #zope3-dev20:21
*** ktwilight_ has quit IRC20:30
*** ktwilight has joined #zope3-dev20:30
*** srichter has quit IRC20:31
*** BjornT has quit IRC20:32
*** BjornT has joined #zope3-dev20:32
*** dunny has joined #zope3-dev20:33
*** J1m has joined #zope3-dev20:44
*** pelle_ has quit IRC20:50
*** jikanter has joined #zope3-dev20:51
*** whit has joined #zope3-dev20:56
*** J1m has quit IRC21:00
*** roym has joined #zope3-dev21:20
*** BjornT has quit IRC21:20
*** BjornT has joined #zope3-dev21:20
*** jikanter has quit IRC21:32
*** srichter has joined #zope3-dev21:39
*** nederhoed has left #zope3-dev21:46
*** whit has quit IRC21:48
*** J1m has joined #zope3-dev21:49
*** makkalot has left #zope3-dev21:50
*** pelle_ has joined #zope3-dev22:09
*** yvl has joined #zope3-dev22:19
*** yvl has left #zope3-dev22:27
*** norro has quit IRC22:43
*** naro has quit IRC22:44
*** naro has joined #zope3-dev22:50
*** wreutz has joined #zope3-dev23:13
*** naro has quit IRC23:35

Generated by 2.15.1 by Marius Gedminas - find it at!