| *** nederhoed has left #zope3-dev | 00:01 | |
| *** nederhoed has joined #zope3-dev | 00:02 | |
| *** naro has quit IRC | 00:08 | |
| *** makkalot has joined #zope3-dev | 00:08 | |
| makkalot | hi I'm very new to zope3 framework and i visited http://wiki.zope.org/zope3 for documentation,but i'm a little bit confused from where should i start? | 00:10 |
|---|---|---|
| makkalot | There are aplenty of documents | 00:10 |
| mgedmin | benji's quick start guide is good | 00:14 |
| mgedmin | http://www.benjiyork.com/quick_start/ | 00:15 |
| makkalot | i'm going to develop a iptables web interface do i should have deeper knowledge about zope? | 00:16 |
| *** hazmat has joined #zope3-dev | 00:31 | |
| *** ChanServ sets mode: +o hazmat | 00:31 | |
| *** nederhoed has quit IRC | 00:39 | |
| makkalot | mgedmin:it is very a really quickstart :), i think i need something deeper.How is this one :http://wiki.zope.org/zope3/book.pdf ? | 00:50 |
| mgedmin | it's good | 00:50 |
| mgedmin | maybe somewhat outdated in some areas | 00:50 |
| makkalot | mgedmin: Could you offer me something you have read,i really should progress in a very short time? | 00:55 |
| mgedmin | I mostly learned zope 3 by reading its source code :) | 00:56 |
| mgedmin | (and writing small parts of it) | 00:56 |
| mgedmin | there are some core ideas, like the component architecture | 00:56 |
| mgedmin | and when you want specific details, the source is sometimes the only place to look | 00:57 |
| makkalot | Ok 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 again | 00:59 |
| *** norro has joined #zope3-dev | 01:15 | |
| *** mgedmin has quit IRC | 01:18 | |
| *** makkalot has left #zope3-dev | 01:20 | |
| *** dobee has quit IRC | 01:42 | |
| *** norro has quit IRC | 02:10 | |
| *** harobed has quit IRC | 03:00 | |
| *** stub has joined #zope3-dev | 03:41 | |
| *** MiUlEr has quit IRC | 03:45 | |
| *** wrobel has quit IRC | 03:53 | |
| *** hazmat has quit IRC | 03:58 | |
| *** hazmat has joined #zope3-dev | 04:00 | |
| *** ChanServ sets mode: +o hazmat | 04:00 | |
| *** replicant has joined #zope3-dev | 04:06 | |
| *** hazmat has quit IRC | 04:06 | |
| *** replicant has quit IRC | 04:07 | |
| *** yota has quit IRC | 04:12 | |
| *** BjornT has quit IRC | 04:40 | |
| *** tonico|away has quit IRC | 04:40 | |
| *** BjornT has joined #zope3-dev | 04:41 | |
| *** tonico|away has joined #zope3-dev | 04:41 | |
| *** Bhaskar has joined #zope3-dev | 05:40 | |
| *** whit has joined #zope3-dev | 05:42 | |
| *** stu1 has joined #zope3-dev | 05:46 | |
| *** stub has quit IRC | 06:04 | |
| *** stu1 has quit IRC | 06:15 | |
| *** whit has quit IRC | 06:28 | |
| *** whit has joined #zope3-dev | 06:32 | |
| Bhaskar | Anybody : have you ecopy of Philip's Zope 3 book (1st ed) in pdf format | 08:07 |
| d2m | Bhaskar, there is no pdf existing from the book | 08:15 |
| *** CSWookie has joined #zope3-dev | 08:20 | |
| *** Jell-O-Fishi has quit IRC | 08:48 | |
| CSWookie | Can I not use a macro I defined earlier in the same template? | 09:02 |
| d2m | CSWookie, did you try use-macro="template/macros/macroname" ? | 09:03 |
| CSWookie | d2m: No, I just used the name. I'll try that. | 09:03 |
| CSWookie | I have a feeling this won't work... I have no idea what the name of the template is. | 09:05 |
| d2m | template is the zpt itself, its a bound name | 09:06 |
| d2m | try verbose: use-macro="template/macros/your_macroname" | 09:06 |
| CSWookie | d2m: Igot a keyerror when I tried that. | 09:07 |
| CSWookie | verbose? OK. | 09:07 |
| d2m | keyerror on 'template' ? | 09:07 |
| CSWookie | Yup. | 09:07 |
| d2m | ok, use a fully qualified name toi find the zpt itself, like use-macro="context/zptid/macros/macroname" ? | 09:08 |
| CSWookie | I'll have to go spelunking to try and figure out what the name of the template is. | 09:12 |
| d2m | but template should not give you a keyerror, i'm shur edo have a syntax error | 09:13 |
| *** Bhaskar has quit IRC | 09:14 | |
| d2m | no, <metal:block define-macro="eins">1</metal:block><div metal:use-macro="template/macros/eins">2</div> works perfect | 09:14 |
| CSWookie | Well, it's giving a keyerror over here. There's probably some special namespace or something going on. | 09:15 |
| CSWookie | I'll go spelunking and figure out what's going on. | 09:15 |
| d2m | want to paste your template to a pastebin ? | 09:15 |
| CSWookie | I can't, or I would. | 09:15 |
| d2m | i see, we are in zope3-dev ;) need to reevaluate my hints | 09:16 |
| CSWookie | Yeah. | 09:16 |
| CSWookie | :-( | 09:16 |
| d2m | ok, works inside a zope3.3.0-svn-trunk instance too | 09:18 |
| d2m | did you try and copy the above snippet to a blank ZPT page ? | 09:19 |
| CSWookie | We'll check and make triple sure. | 09:19 |
| CSWookie | KeyError | 09:21 |
| d2m | ok, really want to past the part of your code ? | 09:21 |
| d2m | paste... | 09:22 |
| CSWookie | I really can't. I appreciate the offer to look, but *shrug* | 09:22 |
| d2m | wait, 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 |
| CSWookie | I imagine theres some funky bug in this project that's causing the problem. | 09:23 |
| CSWookie | Yep. | 09:23 |
| CSWookie | Specifically on line 1 and column 48 | 09:24 |
| d2m | line1 col 48 is where ? | 09:24 |
| CSWookie | Beginning of the div | 09:25 |
| d2m | ok, add this into your url: http://localhost:8080/++skin++Debug/path/to/your/zpt | 09:27 |
| d2m | gets your a verbose traceback of the error | 09:28 |
| CSWookie | If I'm already using a custom skin, can I use them both? | 09:28 |
| CSWookie | And if so, how? | 09:28 |
| CSWookie | d2m: And is it more verbose than the error log in the zmi? | 09:29 |
| CSWookie | Or is that the same? | 09:29 |
| d2m | just try http://localhost:8080/++skin++Debug/path-to-the-test-zpt | 09:29 |
| d2m | no, if you can supply a copy of the error in a pastebin i'm ok too | 09:29 |
| CSWookie | I dunno if I can. However, if template were a bound name, it would appear in tne Names dictionary in the traceback, no? | 09:33 |
| d2m | maybe you changed the default traverser for zpts ? | 09:33 |
| CSWookie | I think in my particular case template is not bound. | 09:33 |
| CSWookie | Yeah. I'm pretty sure it's been changed. | 09:34 |
| CSWookie | Eh. I'll talk to the other guys about this later. If it's a bug, it needs fixed. | 09:38 |
| *** d2m_ has joined #zope3-dev | 10:05 | |
| *** d2m has quit IRC | 10:24 | |
| *** jkakar has quit IRC | 10:31 | |
| *** naro has joined #zope3-dev | 10:40 | |
| *** dobee has joined #zope3-dev | 10:43 | |
| *** pelle_ has joined #zope3-dev | 11:01 | |
| *** dobee has quit IRC | 11:01 | |
| *** dunny has quit IRC | 11:18 | |
| *** svenn has joined #zope3-dev | 11:46 | |
| *** ofer has joined #zope3-dev | 12:24 | |
| *** timte has joined #zope3-dev | 12:27 | |
| *** pelle_ has quit IRC | 12:33 | |
| *** ktwilight_ has joined #zope3-dev | 12:37 | |
| *** ktwilight has quit IRC | 12:44 | |
| *** ofer has quit IRC | 12:48 | |
| *** philiKON has joined #zope3-dev | 13:17 | |
| *** WebMaven has joined #zope3-dev | 13:18 | |
| WebMaven | srichter: ayt | 13:19 |
| *** svenn has quit IRC | 13:20 | |
| *** srichter has quit IRC | 13:34 | |
| *** philiKON_ has joined #zope3-dev | 13:44 | |
| *** philiKON has quit IRC | 13:44 | |
| *** nederhoed has joined #zope3-dev | 13:44 | |
| *** philiKON_ is now known as philiKON | 13:45 | |
| *** dobee has joined #zope3-dev | 13:58 | |
| *** srichter has joined #zope3-dev | 14:06 | |
| *** mgedmin has joined #zope3-dev | 14:21 | |
| *** dobee has quit IRC | 14:48 | |
| *** yvl has joined #zope3-dev | 15:03 | |
| *** pelle_ has joined #zope3-dev | 15:07 | |
| CSWookie | Is there a way to define a macro without the template in it actually being executed? | 15:09 |
| mgedmin | yes | 15:09 |
| mgedmin | <tal:block condition="nothing"><div metal:define-macro="foo">...</div></tal:block> | 15:09 |
| CSWookie | OK. I thought that might be it, but I thought maybe the condition would keep the macro from being defined. Thanks. | 15:10 |
| mgedmin | the interaction of tal and metal is rather tricky | 15:12 |
| mgedmin | you 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 processed | 15:12 |
| mgedmin | once you figure that out, everything becomes clear | 15:12 |
| mgedmin | e.g. how definitions trickle down from outside macros | 15:13 |
| *** yvl has left #zope3-dev | 15:13 | |
| *** BjornT has quit IRC | 15:13 | |
| *** BjornT has joined #zope3-dev | 15:13 | |
| CSWookie | Ah. | 15:15 |
| CSWookie | So metal always happens first? | 15:15 |
| CSWookie | So they really are macros a la a C preprocessor? | 15:16 |
| philiKON | yes | 15:16 |
| CSWookie | OK. that does clarify things. I thought the whole macro thing was just an analogy. | 15:16 |
| *** pelle_ has quit IRC | 15:18 | |
| CSWookie | Does fill-slot or use-macro happen first? | 15:19 |
| philiKON | well, fill-slot only makes sense within a use-macro | 15:20 |
| philiKON | use-macro takes the TAL bytecode from the original template and puts it into the code structure of the current one | 15:20 |
| CSWookie | Right. I'm filling a slot by using a few macros. | 15:21 |
| *** BjornT has quit IRC | 15:22 | |
| *** BjornT has joined #zope3-dev | 15:22 | |
| mgedmin | you mean you have <div metal:fill-slot="foo" metal:use-macro="bar"> ? | 15:25 |
| mgedmin | (inside another use-macro) | 15:25 |
| mgedmin | I think the order of interpretation is documented somewhere | 15:25 |
| CSWookie | mgedmin: Yes. With the goal being to fill foo with bar. | 15:25 |
| mgedmin | at least it was documented for TAL (tal:define first, tal:condition next, etc.) | 15:25 |
| mgedmin | when in doubt, you can always force an explicit order by nesting fake elements | 15:26 |
| mgedmin | <tal:anyting>, <metal:anything> | 15:26 |
| CSWookie | Yeah. | 15:27 |
| CSWookie | If 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 m2 | 15:30 |
| *** yota has joined #zope3-dev | 15:47 | |
| *** pelle_ has joined #zope3-dev | 15:52 | |
| *** natea has joined #zope3-dev | 16:25 | |
| *** philiKON has quit IRC | 16:31 | |
| *** jfroche has joined #zope3-dev | 16:32 | |
| *** d2m_ has quit IRC | 16:37 | |
| *** ChanServ sets mode: +o srichter | 16:38 | |
| *** natea has quit IRC | 16:46 | |
| *** bigkevmcd has joined #zope3-dev | 16:48 | |
| nederhoed | hello, I succeeded in adding a form to my content object, by registering it as a page for the class in zcml | 16:53 |
| nederhoed | roughly following: | 16:53 |
| nederhoed | http://mail.zope.org/pipermail/zope3-users/2006-March/002700.html | 16:53 |
| nederhoed | What I want is the form beneath a view on my content on 1 page | 16:53 |
| nederhoed | how can I merge a view and this form? | 16:54 |
| nederhoed | can I let my own template extend pageform.pt for example? | 17:05 |
| *** zagy has joined #zope3-dev | 17:10 | |
| mgedmin | yes | 17:13 |
| mgedmin | nederhoed: in your form class (I assume you use formlib, right?) define a template attribute | 17:14 |
| mgedmin | template = ViewPageTemplateFile('foo.pt') | 17:14 |
| mgedmin | use your view's .pt as foo.pt | 17:14 |
| mgedmin | in it, add the necessary <form> ... </form> stuff with all the widgets | 17:15 |
| mgedmin | <div metal:use-macro="context/@@form_macros/widget_rows></div> should come in handy | 17:15 |
| mgedmin | if I recall the syntax correctly | 17:15 |
| mgedmin | you can look at the pageform.pt to see what you need to render the widgets and actions | 17:15 |
| nederhoed | formlib.form.PageForm | 17:15 |
| nederhoed | super | 17:16 |
| nederhoed | I'll do that | 17:16 |
| nederhoed | what do you mean with add the widgets, I defined them in an interface using schema... | 17:20 |
| mgedmin | I mean you want the html to have all the <input> elements for your widgets | 17:22 |
| mgedmin | so you need to include them in the page template | 17:22 |
| mgedmin | which you can do by using the widget-rows macro | 17:22 |
| nederhoed | (still trying :) ) | 17:47 |
| nederhoed | almost there | 17:54 |
| *** ofer has joined #zope3-dev | 17:58 | |
| nederhoed | If I could just use 'pageform.pt/macros/form' from my template, it would suffice | 18:02 |
| mgedmin | you can, with a little trickery | 18:03 |
| mgedmin | in your class, say default_template = form.PageForm.template | 18:03 |
| mgedmin | then in your page template metal:use-macro="view/default_template/macros/form" | 18:04 |
| nederhoed | ok | 18:04 |
| nederhoed | smart | 18:05 |
| nederhoed | merci merci, exactly what I wanted! | 18:07 |
| *** J1m has joined #zope3-dev | 18:14 | |
| *** bigkevmcd has quit IRC | 18:19 | |
| *** bigkevmcd has joined #zope3-dev | 18:19 | |
| *** ignas has joined #zope3-dev | 18:37 | |
| nederhoed | strangely enough, the 'data' variable stays empty | 18:38 |
| nederhoed | after submitting: | 18:39 |
| nederhoed | data == {} | 18:39 |
| nederhoed | request.form == {u'reactie.comments': u'', u'reactie.actions.send': u'Send', u'reactie.subject': u''} | 18:39 |
| mgedmin | in your action handler? | 18:40 |
| mgedmin | with formlib, it is the job of the validator to fill in the data dict | 18:41 |
| mgedmin | if you haven't overridden the default validator, it should work fine | 18:42 |
| mgedmin | if you have, you have to call form.getWidgetsData yourself | 18:42 |
| nederhoed | you're a wizard, I actually did override the validator | 18:45 |
| nederhoed | merci, that solved the puzzle | 18:47 |
| *** J1m has quit IRC | 19:19 | |
| *** naro has quit IRC | 19:22 | |
| *** harobed has joined #zope3-dev | 19:34 | |
| *** norro has joined #zope3-dev | 19:41 | |
| *** makkalot has joined #zope3-dev | 19:48 | |
| *** naro has joined #zope3-dev | 19:53 | |
| *** philiKON has joined #zope3-dev | 20:01 | |
| *** SteveA_ has joined #zope3-dev | 20:05 | |
| *** SteveA_ has quit IRC | 20:05 | |
| *** witsch has joined #zope3-dev | 20:10 | |
| *** whit has quit IRC | 20:16 | |
| *** witsch has left #zope3-dev | 20:21 | |
| *** ktwilight_ has quit IRC | 20:30 | |
| *** ktwilight has joined #zope3-dev | 20:30 | |
| *** srichter has quit IRC | 20:31 | |
| *** BjornT has quit IRC | 20:32 | |
| *** BjornT has joined #zope3-dev | 20:32 | |
| *** dunny has joined #zope3-dev | 20:33 | |
| *** J1m has joined #zope3-dev | 20:44 | |
| *** pelle_ has quit IRC | 20:50 | |
| *** jikanter has joined #zope3-dev | 20:51 | |
| *** whit has joined #zope3-dev | 20:56 | |
| *** J1m has quit IRC | 21:00 | |
| *** roym has joined #zope3-dev | 21:20 | |
| *** BjornT has quit IRC | 21:20 | |
| *** BjornT has joined #zope3-dev | 21:20 | |
| *** jikanter has quit IRC | 21:32 | |
| *** srichter has joined #zope3-dev | 21:39 | |
| *** nederhoed has left #zope3-dev | 21:46 | |
| *** whit has quit IRC | 21:48 | |
| *** J1m has joined #zope3-dev | 21:49 | |
| *** makkalot has left #zope3-dev | 21:50 | |
| *** pelle_ has joined #zope3-dev | 22:09 | |
| *** yvl has joined #zope3-dev | 22:19 | |
| *** yvl has left #zope3-dev | 22:27 | |
| *** norro has quit IRC | 22:43 | |
| *** naro has quit IRC | 22:44 | |
| *** naro has joined #zope3-dev | 22:50 | |
| *** wreutz has joined #zope3-dev | 23:13 | |
| *** naro has quit IRC | 23:35 | |
Generated by irclog2html.py 4.0.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!