*** niemeyer has quit IRC | 00:16 | |
*** bskahan has quit IRC | 00:17 | |
*** SureshZ has left #zope3-dev | 00:20 | |
nederhoed | suppose I have a view: index.html, what would it be called when in the browser someone types "index.html/240" ? | 00:28 |
---|---|---|
*** jhauser has quit IRC | 00:28 | |
nederhoed | If yes, can I detect the rest of the query string | 00:29 |
nederhoed | I would like to process the /240 part in my view | 00:31 |
projekt01 | It depends on the traverser of index.html. Find out what traverser is used for index.html | 00:33 |
nederhoed | more concrete, when someone requests "image/240" I would like to output the image, using a resize utility, with a width of 240 | 00:34 |
nederhoed | ok, thanks projekt | 00:34 |
nederhoed | I should adapt the traverser? | 00:34 |
projekt01 | The traverser is doing it in the method travers() what you looking for | 00:34 |
projekt01 | Hm, the traverser on the object where index.html is a view of, will call something like getMultiAdapter(object, request, name="index.html") I guess. | 00:38 |
projekt01 | And then the view "index.html" returns | 00:38 |
nederhoed | the object I am using is from interface IImage | 00:39 |
projekt01 | Did you take a look on the photo package if this pattern is used there allready? | 00:39 |
nederhoed | it has no traverse(), I could add the traverse interface maybe | 00:40 |
nederhoed | the photo package implements a photo as a BTreeContainer | 00:40 |
projekt01 | No | 00:40 |
nederhoed | and adds a fixed set of children: some preset image sizes | 00:40 |
nederhoed | it uses a utility to create the resized images | 00:41 |
nederhoed | that last step seems desirable | 00:41 |
projekt01 | Ok I see, not what we are looking for. | 00:41 |
nederhoed | indeed | 00:41 |
projekt01 | Give me some minutes to take a the source... | 00:42 |
nederhoed | though it might be sufficient for my solution, I thought it would be nice to parse what's behind the image path | 00:42 |
nederhoed | ok, I'm in no hurry :) | 00:42 |
*** tarek has quit IRC | 00:42 | |
nederhoed | image/200x would resize it to a width of 200, respecting x/y ratio | 00:44 |
nederhoed | image/x200 would resize it to a height of 200, maintaining ratio | 00:45 |
nederhoed | image 100x200, would set its size fixed | 00:45 |
VladDrac | image/1000000x10000000 would crash XP :) | 00:46 |
nederhoed | :) | 00:46 |
nederhoed | I would restrict its values to the max of the original width or height | 00:46 |
nederhoed | I am starting to understand Zope3 more and more | 00:47 |
nederhoed | it took some time | 00:47 |
projekt01 | VladDrac,it depends on the quality of the library. Some renderer can crash the system ;-) | 00:47 |
VladDrac | nederhoed: this sounds like functionality that I should build into my photoproduct | 00:48 |
nederhoed | I think so, I was thinking of building it for myself and then notifying you of my findings | 00:49 |
nederhoed | I am too much of a Z3 beginner to add source code to trunks | 00:49 |
nederhoed | :) | 00:49 |
VladDrac | heh | 00:49 |
VladDrac | well as long as you work in a branche | 00:49 |
VladDrac | anyway, bedtime | 00:50 |
nederhoed | ok, one last q | 00:50 |
nederhoed | I should implement that photo package as a product / package? | 00:50 |
nederhoed | well whatever, good nigth! | 00:51 |
projekt01 | nederhoed, can you point your browser to our broken viewcvs ta: | 00:52 |
projekt01 | http://viewcvs.tiks.org/viewcvs/*checkout*/Tiks/trunk/src/tiks/siteproperty/browser/property.py?content-type=text%2Fplain&rev=2038 | 00:52 |
nederhoed | yes, I'm there | 00:52 |
projekt01 | You see the class class HasProperty | 00:53 |
projekt01 | It collects from the request some variables | 00:53 |
nederhoed | uhu | 00:53 |
projekt01 | Could be 100x100 in your case | 00:54 |
nederhoed | cool | 00:54 |
projekt01 | Goto this url and download the configure file: | 00:54 |
projekt01 | http://viewcvs.tiks.org/viewcvs/Tiks/trunk/src/tiks/siteproperty/browser/configure.zcml?rev=2185&view=markup | 00:54 |
projekt01 | The view of viewcvs is broken, but download works | 00:54 |
projekt01 | See the registration of the HasProperty view, you see also other classes/methods like GetProperty / SetProperty as example | 00:55 |
nederhoed | I do not yet understand the code, but I will give it a try. thanks a lot | 00:55 |
projekt01 | It's a view on a object like object/getProperty | 00:56 |
projekt01 | Where you can set the property like object/getProperty/foo&bar | 00:56 |
nederhoed | ok ok like that | 00:57 |
nederhoed | I think this will do indeed | 00:57 |
projekt01 | In you case this could be imageObject/showImageWithWidthAndHight/100x100 and return the right sized image | 00:59 |
projekt01 | You/your | 00:59 |
nederhoed | ok I'll see how far I getr | 00:59 |
nederhoed | this is indeed what I was aiming at | 00:59 |
projekt01 | Hope that helps you for future steps | 01:00 |
*** timte has quit IRC | 01:00 | |
nederhoed | you derive HasProperty from BrowserView, should I derive from IImage? | 01:01 |
projekt01 | No also from BrowserView, because it's a view for IImage | 01:01 |
projekt01 | It's a adapter vor IImage which resizes the image | 01:02 |
nederhoed | ok... I'll just try, will you be around tomorrow? | 01:02 |
*** RaFromBRC has quit IRC | 01:02 | |
*** J1m has quit IRC | 01:02 | |
projekt01 | Yes, most the time | 01:02 |
nederhoed | can I e-mail you for direction might I need them? | 01:04 |
nederhoed | I could post them to the zope3-users also of course | 01:04 |
projekt01 | Yup, a mail to me is ok if you have question | 01:05 |
nederhoed | ok, I have found your address, good night, greeting from The Hague | 01:06 |
projekt01 | See you | 01:08 |
projekt01 | Btw, What's The Hague? | 01:08 |
*** roym has quit IRC | 01:13 | |
*** roym2 has quit IRC | 01:13 | |
*** apoirier has joined #zope3-dev | 01:14 | |
nederhoed | a city in The Netherlands | 01:17 |
nederhoed | Den Haag / La Haye / The Hague | 01:17 |
projekt01 | Ah Ok | 01:18 |
*** bskahan has joined #zope3-dev | 01:19 | |
nederhoed | I just turned down an invitation to go into town to have a drink with 2 girls. :s | 01:30 |
nederhoed | ha changed my mind, bye! | 01:34 |
*** nederhoed has left #zope3-dev | 01:34 | |
*** apoirier has quit IRC | 01:47 | |
*** elbixio has joined #zope3-dev | 01:53 | |
*** elbixio has quit IRC | 02:01 | |
*** bskahan has quit IRC | 02:02 | |
*** dagnachew has joined #zope3-dev | 02:04 | |
*** d2m has quit IRC | 02:09 | |
*** dagnachew has quit IRC | 02:18 | |
*** deo has quit IRC | 02:18 | |
*** yota has quit IRC | 03:18 | |
*** deo has joined #zope3-dev | 03:23 | |
*** bskahan has joined #zope3-dev | 03:29 | |
*** projekt01 has quit IRC | 03:30 | |
*** RaFromBRC has joined #zope3-dev | 05:16 | |
*** gsbain has quit IRC | 05:40 | |
*** bradb has quit IRC | 06:18 | |
*** mnemoc_ has joined #zope3-dev | 06:20 | |
mnemoc_ | hi, i have 2.7.6 and X3 3.0.0, i don't understand well how to make my 2.7.6 instances use also X3? (to load Five after that) | 06:22 |
*** BjornT_ has joined #zope3-dev | 06:35 | |
*** BjornT has quit IRC | 06:35 | |
*** bskahan has quit IRC | 06:45 | |
srichter | mnemoc_: you really want to ask this question on the #z3-base channel | 06:52 |
mnemoc_ | cpssharedcalendar docs confusedme | 06:53 |
*** BjornT_ has quit IRC | 07:01 | |
*** mnemoc_ has left #zope3-dev | 07:43 | |
*** hazmat has joined #zope3-dev | 08:28 | |
*** ChanServ sets mode: +o hazmat | 08:31 | |
*** elbixio has joined #zope3-dev | 08:38 | |
bob2 | srichter: how closely does your book (zope.org version) match what 3.1 will be like? | 08:39 |
bob2 | also, is it possible to change the template used to render built-in objects, like IFolder? | 08:47 |
*** elbixio has quit IRC | 08:55 | |
SteveA | bob2: you can override zcml declarations, so yes, you can override the template used to render such objects | 10:50 |
SteveA | i do think that the idea of IFolder being "built in" is wrong, though | 10:50 |
bob2 | hmmm | 10:52 |
bob2 | I seem to get errors when I naievely just add <page> entries to configure.zcml | 10:53 |
VladDrac | then don't do that :) | 11:09 |
bob2 | how should I override the defaults then? | 11:11 |
philiKON | bob2, see overrides.zcml | 11:12 |
bob2 | ahh | 11:12 |
*** philiKON has quit IRC | 11:30 | |
bob2 | hm | 11:36 |
bob2 | what does an error like this tend to indicate: | 11:36 |
bob2 | ComponentLookupError: (<InterfaceClass zope.component.interfaces.IFactory>, u'AddDirectory.html') | 11:36 |
bob2 | (when clicking on the "Add" link for a class I created.) | 11:37 |
VladDrac | that AddDirectory isn't registered | 11:38 |
bob2 | hmm | 11:39 |
bob2 | I've done an addMenuItem for it | 11:39 |
bob2 | ah, I think I see what I've done wrong | 11:40 |
bob2 | woo | 11:40 |
bob2 | thanks | 11:40 |
*** RaFromBRC has quit IRC | 11:41 | |
*** elbixio has joined #zope3-dev | 11:41 | |
elbixio | Hello all. I just wanted to know what's the function of the "title" attribute in the ITitledTokenizedTerm interface when using Vocabularies? | 11:44 |
elbixio | "value" attribute -> term's value; "token" attribute -> term's identification; "title" attribute -> ??? | 11:45 |
elbixio | Am I missing something here? Thanks. | 11:45 |
*** mexiKON has joined #zope3-dev | 11:52 | |
elbixio | hi philipp, can i ask you something? | 11:53 |
mexiKON | sure | 11:54 |
elbixio | :) i'm just trying to understand the "title" attribute in the ITitledTokenizedTerm interface | 11:55 |
elbixio | "value" attribute -> term's value; "token" attribute -> term's identification; "title" attribute -> ??? | 11:55 |
elbixio | Am I getting it right? | 11:55 |
mexiKON | hang on, phone | 11:56 |
elbixio | ok, np | 11:57 |
mexiKON | elbixio, back | 12:18 |
elbixio | mexiKON, hey :) | 12:18 |
mexiKON | elbixio, the 'title' is used for representing vocabulary tokens in forms | 12:19 |
mexiKON | imagine a dropdown box | 12:19 |
mexiKON | where you can choose from different values within a vocabulary | 12:19 |
mexiKON | you don't want to see the token (which is supopsed to be an all ascii representation) | 12:19 |
mexiKON | you don't want to see the value because it is an object generally | 12:19 |
elbixio | "...the value because it is an object generally" :O i didn't think about this | 12:20 |
elbixio | thought that values where like strings | 12:21 |
elbixio | and titles where used for the same purpose | 12:21 |
elbixio | but i understand better now | 12:21 |
mexiKON | imagine a vocabulary of utilities | 12:26 |
mexiKON | the values are the utilities | 12:27 |
mexiKON | because for example you want the user to choose a utility, but the user doesn't want to see <zope.app.foobar.FooUtility ... > | 12:27 |
mexiKON | :0 | 12:27 |
mexiKON | :) | 12:27 |
elbixio | it opens a world of possibilities, right? :) | 12:27 |
mexiKON | yup :) | 12:28 |
elbixio | i was thinking too simple because i just need a "cities" dropdown box | 12:28 |
*** BjornT has joined #zope3-dev | 12:42 | |
*** yota has joined #zope3-dev | 12:50 | |
*** elbixio has quit IRC | 12:56 | |
*** d2m has joined #zope3-dev | 13:05 | |
*** hazmat has quit IRC | 13:14 | |
*** projekt01 has joined #zope3-dev | 13:43 | |
*** J1m has joined #zope3-dev | 14:54 | |
*** deo has quit IRC | 15:00 | |
*** mexiKON is now known as philiKON | 15:07 | |
*** bradb has joined #zope3-dev | 17:48 | |
*** projekt01 has quit IRC | 18:04 | |
*** timte has joined #zope3-dev | 18:09 | |
*** J1m has quit IRC | 18:19 | |
*** d2m has quit IRC | 18:47 | |
*** Theuni has quit IRC | 18:47 | |
*** d2m_ has quit IRC | 18:47 | |
*** vinsci has quit IRC | 18:47 | |
*** roym has joined #zope3-dev | 18:48 | |
*** d2m has joined #zope3-dev | 18:49 | |
*** Theuni has joined #zope3-dev | 18:49 | |
*** vinsci has joined #zope3-dev | 18:49 | |
*** d2m_ has joined #zope3-dev | 18:49 | |
*** nederhoed has joined #zope3-dev | 18:51 | |
*** povbot has joined #zope3-dev | 18:55 | |
nederhoed | VladDrac, are you there? | 18:55 |
roym | or can someone please point me to an example of where RadioWidget is used. thanks. | 19:00 |
*** timte has joined #zope3-dev | 19:01 | |
*** BjornT has joined #zope3-dev | 19:01 | |
*** BjornT has quit IRC | 19:09 | |
VladDrac | I am | 19:09 |
*** BjornT has joined #zope3-dev | 19:18 | |
*** bradb has quit IRC | 19:28 | |
*** hazmat has joined #zope3-dev | 19:38 | |
nederhoed | ok, should I register utilities from the photo package by hand? | 19:52 |
nederhoed | I get a ComponentLookupError for the PILImageUtility | 19:53 |
nederhoed | I'm off | 19:57 |
*** nederhoed has left #zope3-dev | 19:57 | |
*** elbixio has joined #zope3-dev | 20:03 | |
*** __gotcha_ has joined #zope3-dev | 20:07 | |
*** xerophyte has joined #zope3-dev | 20:21 | |
*** __gotcha has quit IRC | 20:25 | |
*** RaFromBRC has joined #zope3-dev | 20:52 | |
*** elbixio has quit IRC | 20:54 | |
*** elbixio has joined #zope3-dev | 20:56 | |
*** dagnachew has joined #zope3-dev | 21:04 | |
philiKON | roym, use CustomSequenceWidget factory | 21:18 |
philiKON | from zope.app.form.browser.editview import EditView | 21:19 |
philiKON | class MyEditView(EditView): | 21:19 |
philiKON | foo_widget = CustomSequenceWidgetFActory(RadioWidget) | 21:19 |
philiKON | <browser:editform ... class="MyEditView" /> | 21:19 |
philiKON | (foo is the name of the field) | 21:20 |
philiKON | we should make the <widget /> subdirective handler check whether to use CustomSequenceWidgetFactory or the plain CustomWidgetFactory | 21:21 |
roym | philiKON, thanks - I also saw this discussion by you (on RadioWidget) a while ago (http://zope3.pov.lt/irclogs/%23zope3-dev.2005-04-06.log.html) - is that still relevant? | 21:36 |
roym | philiKON, also am working my way thru your book - makes things much clearer... | 21:37 |
roym | philiKON, it does strike me as odd that there is no straightforward way of using a RadioWidget (ie: without custom code). Is this a hole - or am I missing the point? | 21:47 |
*** elbixio has quit IRC | 21:54 | |
*** dagnachew has quit IRC | 22:16 | |
philiKON | roym, you're right it is a whole | 22:42 |
philiKON | roym, as i said above, we shoudl make the <widget /> directive work with sequence widgets | 22:42 |
philiKON | i have a plan how to do it already, maybe i'll manage to check it in tonight or tomorrow | 22:42 |
roym | philiKON, thats good to know - I will be your beta tester if you like. | 22:50 |
roym | my email is roymath@yahoo.com if you need. | 22:51 |
philiKON | roym, no checkin to the zope 3 repository without an automated test :), but human testers are always appreciated, of course | 23:19 |
*** elbixio has joined #zope3-dev | 23:28 | |
*** elbixio has quit IRC | 23:35 | |
*** dagnachew has joined #zope3-dev | 23:42 | |
*** dagnachew has quit IRC | 23:50 | |
roym | Folks, I would like to use postgresql as the storage for a couple of attributes from a class, rather than ZODB. Since Zope3 is so wonderfully pluggable, I imagine this is doable.. where can I find some pointers to this? Thanks! | 23:56 |
Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!