*** povbot has joined #zope3-dev | 11:07 | |
*** schwendinger has joined #zope3-dev | 11:07 | |
*** ktwilight_ has quit IRC | 11:25 | |
*** ktwilight_ has joined #zope3-dev | 11:26 | |
*** wrobel has joined #zope3-dev | 11:29 | |
*** yvl has joined #zope3-dev | 11:33 | |
*** ktwilight_ has quit IRC | 11:45 | |
*** ktwilight_ has joined #zope3-dev | 11:46 | |
*** zagy has quit IRC | 11:48 | |
*** zagy has joined #zope3-dev | 11:50 | |
*** jodok has quit IRC | 11:51 | |
*** goschtl has joined #zope3-dev | 11:59 | |
*** ktwilight has joined #zope3-dev | 12:04 | |
*** ktwilight_ has quit IRC | 12:04 | |
*** jodok has joined #zope3-dev | 12:07 | |
*** elro has quit IRC | 12:14 | |
*** alga has joined #zope3-dev | 12:15 | |
*** RedDevils has joined #zope3-dev | 12:27 | |
*** RedDevils has quit IRC | 12:33 | |
*** RedDevils has joined #zope3-dev | 12:40 | |
*** RedDevils has quit IRC | 12:42 | |
*** RedDevils has joined #zope3-dev | 12:47 | |
*** RedDevils has left #zope3-dev | 12:48 | |
*** P_Parker has joined #Zope3-dev | 12:48 | |
*** P_Parker has left #Zope3-dev | 12:49 | |
*** andrew_m has joined #zope3-dev | 12:52 | |
*** mkerrin has joined #zope3-dev | 12:56 | |
*** deo has joined #zope3-dev | 13:02 | |
*** witsch has joined #zope3-dev | 13:05 | |
*** rocky|away is now known as rokcy | 13:06 | |
*** rokcy is now known as rocky | 13:06 | |
*** zagy has quit IRC | 13:06 | |
*** b52laptop has joined #zope3-dev | 13:06 | |
*** witsch has quit IRC | 13:20 | |
*** alga has quit IRC | 13:25 | |
*** lurker is now known as lurker|lunch | 13:26 | |
*** anson has joined #zope3-dev | 13:35 | |
*** anson has left #zope3-dev | 13:35 | |
*** goschtl has quit IRC | 13:36 | |
*** anson has joined #zope3-dev | 13:36 | |
*** zagy has joined #zope3-dev | 13:38 | |
*** anson has quit IRC | 13:41 | |
*** dobee has quit IRC | 13:44 | |
*** nikhil_n has joined #zope3-dev | 13:44 | |
*** romanofski has quit IRC | 13:49 | |
*** nikhil_n has left #zope3-dev | 13:54 | |
*** nikhil_n has joined #zope3-dev | 13:55 | |
*** romanofski has joined #zope3-dev | 13:56 | |
*** ghendi has quit IRC | 14:00 | |
baijum | Hi nikhil_n | 14:10 |
---|---|---|
*** greenman has quit IRC | 14:12 | |
*** ignas has joined #zope3-dev | 14:13 | |
*** nikhiln has joined #zope3-dev | 14:16 | |
*** nikhil_n has quit IRC | 14:20 | |
*** nikhiln has left #zope3-dev | 14:25 | |
*** stub has quit IRC | 14:26 | |
*** naro has quit IRC | 14:29 | |
*** emp[1] has joined #zope3-dev | 14:30 | |
*** goschtl has joined #zope3-dev | 14:31 | |
*** dunny has quit IRC | 14:39 | |
*** greenman has joined #zope3-dev | 14:44 | |
*** BjornT has quit IRC | 14:45 | |
*** BjornT has joined #zope3-dev | 14:45 | |
*** stub has joined #zope3-dev | 14:46 | |
*** dobee has joined #zope3-dev | 14:58 | |
*** tarek has joined #zope3-dev | 14:58 | |
*** niemeyer has joined #zope3-dev | 15:07 | |
*** projekt01 has joined #zope3-dev | 15:09 | |
*** nikhiln has joined #zope3-dev | 15:13 | |
*** hazmat has joined #zope3-dev | 15:13 | |
*** ChanServ sets mode: +o hazmat | 15:13 | |
*** RedDevils has joined #zope3-dev | 15:16 | |
*** romanofski has quit IRC | 15:19 | |
*** naro has joined #zope3-dev | 15:19 | |
*** romanofski has joined #zope3-dev | 15:21 | |
*** Aswin_S has joined #Zope3-dev | 15:21 | |
*** ccomb has left #zope3-dev | 15:23 | |
dennis_ | is there a way I can restrict my "context/@@absolute_url/breadcrumbs" to the nearest ISite? i.e. I have my site in /mysite/.. and would prefer to have the breadcrumbs to be all relative to that, rather than the root, without any special doing in my views | 15:26 |
*** RedDevils has quit IRC | 15:31 | |
*** jinty has joined #zope3-dev | 15:41 | |
*** naro has quit IRC | 15:56 | |
*** lurker|lunch is now known as lurker | 16:01 | |
ignas | dennis_: try writing a custom url view for your objects | 16:04 |
ignas | or looking at the way it currently works | 16:04 |
*** meatballhat has joined #zope3-dev | 16:07 | |
*** b52GM has quit IRC | 16:10 | |
*** b52laptop has quit IRC | 16:10 | |
*** b52laptop has joined #zope3-dev | 16:10 | |
*** b52GM has joined #zope3-dev | 16:10 | |
*** emp[1] has quit IRC | 16:18 | |
*** Jell-O-Fishi has quit IRC | 16:21 | |
*** Jell-O-Fishi has joined #zope3-dev | 16:29 | |
*** greenman has quit IRC | 16:30 | |
*** stub has quit IRC | 16:32 | |
*** hazmat has quit IRC | 16:38 | |
*** hazmat has joined #zope3-dev | 16:39 | |
*** ChanServ sets mode: +o hazmat | 16:39 | |
*** nikhiln has left #zope3-dev | 16:42 | |
*** hazmat has quit IRC | 16:46 | |
*** hazmat has joined #zope3-dev | 16:47 | |
*** ChanServ sets mode: +o hazmat | 16:47 | |
*** J1m has joined #zope3-dev | 16:47 | |
*** RedDevils has joined #zope3-dev | 16:59 | |
*** sorindregan has quit IRC | 17:03 | |
*** meatballhat_ has joined #zope3-dev | 17:04 | |
*** RedDevils has quit IRC | 17:04 | |
*** Aswin_S has quit IRC | 17:04 | |
*** redir has joined #zope3-dev | 17:05 | |
*** ka-jod has joined #zope3-dev | 17:11 | |
*** baijum has quit IRC | 17:12 | |
*** foxmjay has joined #zope3-dev | 17:16 | |
timte | Can I get all adapters that are registered for a certain context interface? | 17:19 |
*** meatballhat has quit IRC | 17:21 | |
*** mgedmin has joined #zope3-dev | 17:24 | |
*** nathany has joined #zope3-dev | 17:33 | |
*** nerdalert has joined #zope3-dev | 17:34 | |
*** naro has joined #zope3-dev | 17:41 | |
timte | getAdapters finds both single and multi adapters, of course that will fail if context has both kinds of adapters, factory will be invoked with equal number of arguments in both cases | 17:45 |
timte | I guess it's not very useful if a specific interface (other than Interface) is specified | 17:46 |
timte | is not specified | 17:46 |
*** schwendinger has quit IRC | 17:48 | |
timte | I can't find any other method than zope.component.getAdapters. How am I supposed to use it safely? | 17:49 |
*** meatballhat_ has quit IRC | 17:49 | |
CSWookie | timte: Hm? | 17:49 |
CSWookie | Safely? | 17:50 |
*** pelle_ has joined #zope3-dev | 17:50 | |
timte | now it throws an exception (__init__ has too few arguments) if a multi adapter is registered for the obj in getAdapters((obj,), Interface) | 17:52 |
timte | do I have to use lower level apis? | 17:52 |
CSWookie | timte: I didn't get what you wanted. | 17:53 |
*** meatballhat has joined #zope3-dev | 17:53 | |
timte | with safely I mean that getAdapters can ignore those adapters it can't create | 17:53 |
timte | CSWookie: should I be more clear? :) | 17:54 |
*** stub has joined #zope3-dev | 17:54 | |
CSWookie | timte: I don't know what you want. getMultiAdapter gets a multiadapter, and getAdapter gets a single adapter. | 17:54 |
timte | getAdapters appears to get multi adapters as well | 17:54 |
CSWookie | timte: There are query variants of each that return a default value if the adapter could not be found or made. The default defaults to None. | 17:55 |
timte | there is no plural getMultiAdapters it seems | 17:55 |
CSWookie | getAdapters, I think gets a list of possibly adapters. I've not had need for it, so I don't understand it as well. | 17:55 |
CSWookie | Is here a queryAdapters? | 17:56 |
timte | nope | 17:56 |
CSWookie | So you don't know exactly what inputs you want to provide for adaptation? | 17:56 |
timte | yes I know, I have an object I want to find adapters for | 17:58 |
*** yvl has quit IRC | 17:58 | |
timte | but getAdapters method finds all adapters including multi ones and tries to create them, but as the adapters need different amount of arguments it fails | 17:58 |
CSWookie | timte: I just find it odd that you want all the adapters. I haven't used that. Granted, I'nly started with zope3 a few months ago. | 17:59 |
CSWookie | s/I'nly/I only/ | 17:59 |
*** whit has joined #zope3-dev | 18:04 | |
*** reco has joined #zope3-dev | 18:10 | |
*** salfield has joined #zope3-dev | 18:14 | |
*** timte has quit IRC | 18:14 | |
*** goschtl has quit IRC | 18:14 | |
*** dobee has quit IRC | 18:16 | |
*** alecm has joined #zope3-dev | 18:19 | |
*** stub has quit IRC | 18:26 | |
*** faassen has joined #zope3-dev | 18:28 | |
faassen | is it possible to provide a display widget for Object widgets depending on the schema the object implements? | 18:30 |
faassen | or would that entail the creation of a new field? | 18:30 |
*** projekt01 has quit IRC | 18:31 | |
*** zagy has quit IRC | 18:32 | |
*** lurker has quit IRC | 18:32 | |
J1m | faassen, I think you could create a new object-field widget that dispatched on the object interface. | 18:35 |
J1m | </wave-hands> | 18:35 |
faassen | J1m: how would the ca know what to dispatch on? | 18:35 |
J1m | The ca wouldn't. | 18:35 |
faassen | J1m: just do an implements based on what schema you pass along? | 18:35 |
J1m | You would register a factory that does the dispatching. | 18:36 |
faassen | J1m: aah, a second dispatch. | 18:36 |
J1m | yes | 18:36 |
faassen | J1m: right. | 18:36 |
faassen | hm, probably in this case it's simpler to just create a new Object field subclass. | 18:36 |
faassen | as I use it multiple times anyway. | 18:37 |
faassen | that is, if that works. :) | 18:37 |
faassen | yes, that does work. | 18:37 |
faassen | J1m: thanks for the feedback though. the idea might be handy later, if this approach doesn't seem to do the trick. | 18:38 |
J1m | k | 18:38 |
faassen | J1m: oh, by the way.. | 18:40 |
faassen | J1m: about your trip to DZUG | 18:40 |
faassen | J1m: when are you arriving and when are you leaving? :) | 18:40 |
J1m | I arrive Saturday at 5:15pm, depart Thursday at 3pm. | 18:42 |
J1m | Those times are at the airport. | 18:42 |
*** jukart has quit IRC | 18:42 | |
faassen | J1m: okay. | 18:42 |
faassen | J1m: monday-tuesday is the DZUG days themselves, right? what are you doing wed? | 18:43 |
J1m | Yes | 18:43 |
J1m | I'll be sprinting Sunday, Wednesday, and, I assume Thursday morning. | 18:43 |
faassen | ah, okay. :) | 18:43 |
faassen | well, sunday as much as we have time for with the meeting and all. | 18:44 |
J1m | Without time out for the DZUG/ZF meeting whenever that is. | 18:44 |
faassen | okay, I want to know so I can time my trip along with yours. | 18:44 |
faassen | I think I'll leave on thursday too then. | 18:44 |
faassen | thanks. :) | 18:44 |
faassen | are you giving a talk at DZUG by the way? | 18:44 |
J1m | Assuming that the German Speaking Zope User's meeting group will be conducted mostly in German, I assume that non-Germain-speakers like myself will have some sprinting time on Monday and Tuesday as well. | 18:45 |
faassen | J1m: aah, right. :) | 18:46 |
J1m | I'm giving a buildout tutorial. | 18:46 |
faassen | J1m: I will be giving a talk in English. :) | 18:46 |
faassen | J1m: cool. | 18:46 |
J1m | I'll come to your talk then. :) | 18:46 |
faassen | J1m: I hadn't thought about that. I understand German so that gives me more of an opportunity to understand stuff. | 18:46 |
faassen | J1m: it's about grok! :) | 18:46 |
J1m | Good, I'd love to get an update. | 18:47 |
J1m | Is it OK if I heckle? ;) | 18:47 |
faassen | okay, I will see how much I can cram into half an hour. | 18:47 |
faassen | sure, you can heckle. I heckle during talks, so you can heckle during mine. :) | 18:47 |
srichter | faassen: to direct your initial question, I would always write a sub-form for an object field | 18:48 |
faassen | srichter: a sub form? | 18:48 |
faassen | srichter: I mean, it already works okay for edit forms. | 18:49 |
srichter | well, for simple, simple sites maybe, but not for real ones, in my experience | 18:49 |
srichter | I often need a lot of control over the fields being placed, a widget hides that from me | 18:50 |
faassen | srichter: requiring people to write sub forms destroys the use case of this application, where it should be really easy to add new forms. | 18:50 |
faassen | srichter: without writing a lot of code. | 18:50 |
srichter | well, a subform (even in zope.formlib) is usually a matter of writing the class (2 lines) and integrating it in update ( 1-2 lines) | 18:51 |
faassen | upgrade is part of the framework, not part of the application. | 18:52 |
*** hazmat has quit IRC | 18:52 | |
faassen | the applications are very declarative. | 18:53 |
*** hazmat has joined #zope3-dev | 18:53 | |
*** ChanServ sets mode: +o hazmat | 18:53 | |
faassen | sorry, update, not 'upgrade'. | 18:53 |
srichter | oh well, if you do not want to use any of the hooks that we provide, then of course, subforms are hard | 18:54 |
faassen | I don't want the people who write the forms to have to worry about hooks. :) | 18:54 |
faassen | I would prefer them to write the schema and as little as possible else. | 18:54 |
*** romanofski has quit IRC | 19:11 | |
*** schwendinger has joined #zope3-dev | 19:11 | |
*** tarek has quit IRC | 19:12 | |
*** Aiste has joined #zope3-dev | 19:13 | |
*** jfroche has quit IRC | 19:14 | |
*** harobed has quit IRC | 19:15 | |
*** natea_ has joined #zope3-dev | 19:17 | |
*** lurker has joined #zope3-dev | 19:20 | |
*** dunny has joined #zope3-dev | 19:25 | |
*** ignas has quit IRC | 19:29 | |
*** ignas has joined #zope3-dev | 19:29 | |
*** dobee has joined #zope3-dev | 19:41 | |
*** dobee has quit IRC | 19:47 | |
*** ka-jod has quit IRC | 19:48 | |
*** hazmat has quit IRC | 19:49 | |
*** hazmat has joined #zope3-dev | 19:50 | |
*** ChanServ sets mode: +o hazmat | 19:50 | |
*** natea_ is now known as natea|away | 19:51 | |
*** jfroche has joined #zope3-dev | 19:51 | |
*** hazmat has quit IRC | 19:52 | |
*** hazmat has joined #zope3-dev | 19:52 | |
*** ChanServ sets mode: +o hazmat | 19:52 | |
*** nathany has quit IRC | 19:53 | |
*** mkerrin has quit IRC | 20:06 | |
*** dobee has joined #zope3-dev | 20:08 | |
*** mkerrin has joined #zope3-dev | 20:12 | |
dennis_ | i have a question about the getParents method in zope.traversing.api .. if you call getParents() on an object which is not an IContainmentRoot, you get a list of all parents up to the ZODB root, any of which can themselves be IContainment roots. (i.e., it doesn't stop traversal when it encounters an IContainment root). Yet if you pass getParent an IContainment root, it returns an empty list immediately, and does not traverse further. Why is the logic | 20:18 |
dennis_ | like that? I would expect it to a) traverse to the ZODB root, or b) stop at the first IContainmentRoot it encounters | 20:18 |
*** timte has joined #zope3-dev | 20:19 | |
J1m | dennis_, I assume that an object is not its own parent. | 20:21 |
*** RaFromBRC has joined #zope3-dev | 20:22 | |
dennis_ | but getParents() does not return its parents at all | 20:22 |
dennis_ | hierarchy: zope.root A / some.icontainmentroot B / some.folder C / some.folder D / some.content E, getParents( C ) gives [B,A], yet getParents(B) gives [], I would either expect the first case to return only [B], or the second case to return also [A], but maybe I missing the point | 20:24 |
*** alga has joined #zope3-dev | 20:30 | |
*** pbugni has joined #zope3-dev | 20:33 | |
*** schwendinger has quit IRC | 20:41 | |
*** Henri__ has joined #zope3-dev | 20:41 | |
*** jukart has joined #zope3-dev | 20:42 | |
J1m | dennis_, getParents should probably be called getAncestors. | 20:42 |
*** zagy has joined #zope3-dev | 20:46 | |
J1m | dennis_, in any case, your example is not case that anyone has considered. | 20:49 |
J1m | Usually, there is one containment root and that is the zope root. | 20:50 |
*** faassen has quit IRC | 20:50 | |
J1m | I suspect there is an adapter for IContainmentRoor that just returns and empty list. | 20:50 |
J1m | I suspect that the default adapter just follows __parent__ until it sees a __parent__ that is None, which is arguably a bug, but works just find in the expected case that there is only one root. | 20:51 |
*** romanofski has joined #zope3-dev | 20:52 | |
dennis_ | i was looking for a way such that: suppose the user is in /mysite/some/where/here/there and uses the search box, which should point to /mysite/search.html, but I don't know the depth (in advance) and i would prefer not to code the logic into the app that it is not located in the root but in mysite. So i wondered how to create the proper a href="" in a search template without hardcoding /mysite | 20:52 |
dennis_ | stumbled on getParents :) | 20:52 |
dennis_ | also though that if mysite is an IContainmentRoot this would work since getParents would stop there (well I thought wrong :) | 20:53 |
*** ignas has quit IRC | 20:54 | |
J1m | I would use zope.app.component.hooks.getSite() to get the current site. | 20:55 |
J1m | Then use the absolute url of that to compute the url you needs. | 20:55 |
*** WebMaven_ has joined #zope3-dev | 20:55 | |
J1m | I wish someone would get around to providing a saner place to import that function from. :) | 20:55 |
dennis_ | :) | 20:56 |
dennis_ | which imports are by default available inside a page template? (ie if i use python: .. ) | 20:56 |
*** WebMaven__ has joined #zope3-dev | 20:56 | |
J1m | It doesn't matter. You shouldn't do any computation in a page template. | 20:57 |
* J1m has an out | 20:57 | |
dennis_ | IPhysicallyLocatable( self ).getNearestSite() does the same | 20:57 |
J1m | Cool. I bet it works harder, but am too lazy to check. | 20:58 |
*** Jell-O-Fishi has quit IRC | 20:58 | |
*** Henri__ has quit IRC | 20:58 | |
dennis_ | thanks for your time j1m | 20:58 |
J1m | yw | 20:59 |
*** jhauser has joined #zope3-dev | 21:00 | |
*** romanofski has quit IRC | 21:04 | |
mgedmin | supposing that I want a view named 'foo' on IFoo to actually be the same thing as another existing view 'bar' on IFoo.bar... | 21:05 |
mgedmin | can I register a function as a multiadapter that did return getMultiAdapter((context.bar, request), name='bar'? | 21:05 |
J1m | I don't know what "another existing view 'bar' on IFoo.bar..." means. | 21:07 |
J1m | ah, maybe you're asking whether you can have a view on an object that just delegates to a view on a subobject? | 21:08 |
*** foxmjay has quit IRC | 21:08 | |
*** WebMaven_ has quit IRC | 21:12 | |
*** WebMaven has quit IRC | 21:12 | |
J1m | The answer is yes. :) | 21:13 |
mgedmin | yippee! :) | 21:14 |
mgedmin | I was just wondering how to register it | 21:14 |
J1m | *I* would keep it simple and just register a view that delegates. | 21:15 |
mgedmin | obviously it is a multi-adapter on the (context, request) | 21:15 |
mgedmin | does it have to provide ibrowserpublisher? | 21:15 |
J1m | Maybe, I'd register a factory that delegates, as you suggested. | 21:15 |
mgedmin | by "delegates" you mean its __call__ would do the getMultiAdapter lookup and call the real view? | 21:15 |
mgedmin | I was hoping to delegate the view creation | 21:16 |
J1m | 2 possibilities. | 21:16 |
J1m | The __call__ (or methods called by __call__) get the view and call methods on it. | 21:16 |
J1m | Alternatively, as you first suggested, you have a factory that redispatches to the sub-object view. | 21:16 |
J1m | It's possible, that you may need to do the former, for example to adjust URLs. | 21:17 |
J1m | I dunno -- depends on specifics. | 21:17 |
J1m | I would do whatever seems easier and simpler. | 21:17 |
J1m | The factory seems a bit simpler on the surface. | 21:18 |
mgedmin | thanks | 21:18 |
J1m | yw | 21:18 |
*** Aiste has quit IRC | 21:25 | |
*** meatballhat has quit IRC | 21:30 | |
*** meatballhat has joined #zope3-dev | 21:30 | |
*** natea|away is now known as natea | 21:45 | |
*** schwendinger has joined #zope3-dev | 21:49 | |
*** schwendinger_ has joined #zope3-dev | 21:51 | |
*** jukart has quit IRC | 21:53 | |
srichter | J1m: did you put your buildout PyCon slides into svn.zope.org somewhere? | 21:54 |
*** lzdych has quit IRC | 22:00 | |
*** zagy has quit IRC | 22:06 | |
*** schwendinger has quit IRC | 22:08 | |
nerdalert | srichter: I have those slides if you want me to post them somewhere | 22:12 |
srichter | nerdalert: thanks, but I found them just a minute ago | 22:12 |
nerdalert | cool | 22:12 |
srichter | and finally saved them on my computer :-) | 22:12 |
* srichter is finally getting a bit deeper into eggs | 22:12 | |
nerdalert | hmm. do you know of any popular channels for ORM stuff? | 22:14 |
srichter | nerdalert: no, usually it is just part of the job | 22:15 |
srichter | nerdalert: I think you are best off asking on the lists | 22:16 |
nerdalert | srichter: you don't happen to know of a place where I could find ORM popularity trends and statistics, do you? | 22:16 |
srichter | no, I just know that people in the Zope 3 world like alchemy | 22:17 |
nerdalert | I'm talking to a guy here at work about language popularity, and I wanted to correlate ORM suckiness to web framework popularity | 22:17 |
srichter | he he | 22:17 |
nerdalert | so people in the zope 3 world don't like sqlos? | 22:20 |
srichter | it has been used | 22:21 |
srichter | some write their own ORM code | 22:21 |
srichter | but of course, there is a large section that does not use RDBs at all and only work with the ZODB | 22:22 |
nerdalert | right | 22:22 |
nerdalert | i <3 ZODB, but sometimes one must work with pre-existing systems | 22:23 |
srichter | right, in this case I usually build very limited bridges | 22:25 |
nerdalert | I need to play around with alchemy sometime. after playing around with sqlos, I wasn't sure I wanted an ORM anymore | 22:25 |
*** RedDevils has joined #zope3-dev | 22:26 | |
srichter | he he | 22:26 |
*** RedDevils has quit IRC | 22:26 | |
*** meatballhat has left #zope3-dev | 22:29 | |
*** mkerrin has quit IRC | 22:29 | |
nerdalert | oops. I didn't mean to bash sqlos. it seems like a fine ORM | 22:31 |
nerdalert | just lately, I wonder if I even want an ORM for some tasks, other than to give me cross-platform RDBMS compliancy | 22:32 |
*** RaFromBRC is now known as RaFromBRC|lunch | 22:32 | |
*** ignas has joined #zope3-dev | 22:32 | |
nerdalert | and all of that assuming I can't use the ZODB for some reason | 22:32 |
srichter | right | 22:35 |
*** RedDevils has joined #zope3-dev | 22:40 | |
*** reco has quit IRC | 22:44 | |
*** norro has joined #zope3-dev | 22:47 | |
*** RedDevils has quit IRC | 22:49 | |
*** dunny has joined #zope3-dev | 22:50 | |
*** pelle_ has quit IRC | 22:52 | |
*** afd_ has quit IRC | 22:54 | |
J1m | srichter, yes | 22:54 |
J1m | in zc/buildout/trunk/doc | 22:55 |
srichter | thanks | 22:55 |
srichter | I'll mark that location too :-) | 22:55 |
* srichter creates eggs right now with almost no idea of what he is doing | 22:55 | |
J1m | Theuni, ayt? | 22:56 |
srichter | J1m: so I have developed a demo package that for one I release as package but I also want to be able to create an isntance | 22:56 |
srichter | J1m: would I create a new project for the instance? | 22:56 |
J1m | Could you pls read what you just wrote and translate it? :) | 22:57 |
srichter | ok, it makes sense to me, but let me elaborate :-) | 22:58 |
srichter | let's say I have a package called ns.demo | 22:58 |
srichter | usually I would have just installed that package in a Zope 3 instance | 22:58 |
srichter | instance/lib/python/ns/demo | 22:59 |
*** benji has joined #zope3-dev | 22:59 | |
srichter | but if I understand your tutorial correctly, I could not build a "distribution" or "egg" that woudl create a full Zope 3 instance with the demo package installed | 22:59 |
* J1m turns up his nose | 22:59 | |
srichter | but if I understand your tutorial correctly, I could now build a "distribution" or "egg" that woudl create a full Zope 3 instance with the demo package installed | 23:00 |
srichter | that means people could just install an egg and try a demo directly without having to build their own Z3 server | 23:01 |
srichter | is that correct? | 23:01 |
J1m | no | 23:01 |
srichter | mmh, darn! :-) | 23:01 |
srichter | so what is the zc.sharing Example in the tutorial really doing? | 23:01 |
J1m | You could conceivably create a distribution that installed a script that started a server. I hope I didn't say anything in the tutorial that could be construed to encourage that. | 23:02 |
J1m | It is a buildout. | 23:02 |
J1m | Let's step back a bit. | 23:02 |
srichter | ok | 23:02 |
J1m | Eggs are for installing *libraries* and *scripts*. That's all. | 23:02 |
srichter | ok | 23:03 |
J1m | While a script could be construed to be an application, usually an application has some configurations, and scripts don't really provide support for customzation directly. | 23:03 |
J1m | While a script could be construed to be an application, usually an application has some configurations, and scripts don't really provide support for customization directly. | 23:04 |
srichter | ok, that's certainly true for z3 | 23:04 |
J1m | The zc.sharing example is a buildout. Someone can create an application configuration by creating a buildout specification for the application and using buildout to build the application, along with it's configuration. | 23:05 |
J1m | Now, if you were focussed on demos, you could create a script that took basic configuration information on it's command line. | 23:06 |
J1m | For example: | 23:06 |
J1m | rundemozope 8080 jim:123 | 23:06 |
J1m | it might be useful for trying something out, but nor for any sort of production use. | 23:06 |
srichter | right, though I like what zc.sharing does | 23:07 |
srichter | I am okay with having the server port specified in the cdfg | 23:07 |
srichter | I am okay with having the server port specified in the cfg | 23:07 |
srichter | (the username/password I do not really care about, since I am making all demos public, at least for this round) | 23:07 |
*** pelle_ has joined #zope3-dev | 23:08 | |
J1m | If you create an egg by running zc.sharing's setup.py. you'll only get the zc.sharing package. You won't get an instance. | 23:08 |
srichter | ok | 23:09 |
srichter | so how would the "instance" part (did I use the right vocabulary?) be built? | 23:09 |
J1m | By running the buildout. | 23:10 |
srichter | oh, ok, I see | 23:10 |
srichter | how would that look in the command line? | 23:10 |
J1m | Note that the instance definition in the zc.sharing buildout exists soley to aid development of zc.sharing. | 23:10 |
srichter | yes, I figured that | 23:11 |
J1m | It lets you try it out interactively. | 23:11 |
srichter | in my case the isntance declaration would just aid to running the demo; since you do not need it on a real development isntance | 23:11 |
J1m | So, first you bootstrap it. e.g.: | 23:11 |
J1m | python2.4 bootstrap.py | 23:11 |
J1m | Then you run the buildout: | 23:11 |
srichter | yes, that step I can do already :-) | 23:11 |
J1m | bin/buildout | 23:11 |
J1m | That should create the instance. | 23:12 |
srichter | yep, got that too :-) | 23:12 |
srichter | ah, so bin/bouldout creates all parts | 23:12 |
J1m | Then, if you were running a modern instance recipe, you'd do get a ctl script for the instance. | 23:12 |
J1m | yes | 23:12 |
J1m | So, if the part was named instance, you'd use: | 23:12 |
J1m | bin/instance start | 23:12 |
srichter | wow, that's neat | 23:12 |
srichter | okay, now I understand where bin/test comes from | 23:13 |
J1m | No, I think the zc.sharing example uses an old instance recipe | 23:13 |
J1m | So for that, you might be stuck with: | 23:13 |
J1m | parts/instance/bin/zopectl start | 23:13 |
J1m | That's a very old instance recipe. | 23:14 |
srichter | what is the latest zc instance recipe? | 23:14 |
J1m | zc.zope3recipes | 23:14 |
srichter | ok, I'll check those out | 23:14 |
J1m | That recipe separates application definition from instance definition. | 23:14 |
J1m | I need to update the app recipe to let you use eggs only. | 23:15 |
srichter | ok | 23:15 |
J1m | Gocept also has an instance recipe. | 23:15 |
srichter | do you still need to specify the ZCML files within the CFG files? | 23:15 |
J1m | It can work with just eggs. | 23:15 |
*** mgedmin has quit IRC | 23:15 | |
J1m | Theuni, took a different approach than I did. | 23:15 |
srichter | Theuni was already so friendly to send me a setup of his | 23:15 |
*** naro has quit IRC | 23:15 | |
J1m | In the zc.zope3recipes:app recipe, you specify a site.zcml as an option in an application part. | 23:16 |
srichter | ah, ok, much better :- | 23:16 |
srichter | ah, ok, much better :-) | 23:16 |
J1m | Ideally, this would be one line that includes the configuration from an application package + maybe a principal definition. | 23:17 |
J1m | The philosophy is that you'll do most of your application configuration in a non-trivial configure.zcml in an application package. | 23:17 |
srichter | right, because you define a complete set of ZCML in a package for ftesting already | 23:17 |
J1m | Yes. | 23:17 |
J1m | And because there should be as little data as possible outside of Python packages. | 23:18 |
srichter | ok, good pattern to know | 23:18 |
J1m | at least, as little application-definition data. | 23:19 |
J1m | at least, as little application-definition data as possible | 23:19 |
srichter | so, if people would want to see the demo in a demo instance, they would check out ns.demo? | 23:19 |
srichter | or would it be better to create a ns.demoisntance project that deos the instance declaration? | 23:19 |
J1m | That would be one way. Alternatively, you could provide a user-fiendly installation script that did that for them. | 23:20 |
J1m | I think that's what the grok project has been playing with. | 23:20 |
J1m | A separate project is another option, but I'm not sure it's necessary. | 23:21 |
srichter | ok | 23:21 |
J1m | A nice thing about a buildout that, it addition to providing a devel environment for working on a package, it also provides a simple usage example. | 23:22 |
srichter | right, that's what zc.sharing does | 23:22 |
*** lucielejard has joined #zope3-dev | 23:23 | |
srichter | so in the case of zc.sharing, how would you create the instance today? | 23:23 |
srichter | I guess: checkout zc.sharing, run bootstrap, run buildbot | 23:23 |
srichter | is there something shorter already? | 23:23 |
J1m | No. I don't need it. | 23:24 |
*** salfield_ has joined #zope3-dev | 23:24 | |
J1m | If I wanted to create a user-fiendly demo, I might invent some tool or see if the Groksters already built one. :) | 23:24 |
srichter | :-) | 23:25 |
srichter | It's just a sidekick for me | 23:25 |
srichter | so checking it out is easy enough for now :-) | 23:25 |
*** bigkev has joined #zope3-dev | 23:25 | |
srichter | darn, buildout takes a long time if you have the usual Zope App dependencies | 23:26 |
*** bigkevmcd has quit IRC | 23:26 | |
*** bigkev is now known as bigkevmcd | 23:26 | |
J1m | There's a bug I need to fix that makes buildout take a very long time if the dependency graph is insane. | 23:27 |
J1m | As ours are atm. | 23:27 |
srichter | he he; yep | 23:27 |
J1m | I'm gonna try to fix it tomorrow morning and make a new buildout release. | 23:28 |
srichter | J1m: thanks for your time and the explanations | 23:28 |
srichter | cool | 23:28 |
J1m | yw | 23:28 |
srichter | I hope that I get the eggs stuff in the next weeks and can help contributing | 23:28 |
*** benji has quit IRC | 23:29 | |
*** RaFromBRC|lunch is now known as RaFromBRC | 23:29 | |
srichter | J1m: one recipe I'd like to write is for coverage reports | 23:35 |
J1m | k | 23:35 |
srichter | so I hope I can get to that point :-) | 23:36 |
*** redir has quit IRC | 23:38 | |
*** salfield has quit IRC | 23:43 | |
*** timte has quit IRC | 23:46 | |
*** dobee has quit IRC | 23:51 | |
*** pelle_ has quit IRC | 23:54 | |
*** hazmat has quit IRC | 23:57 |
Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!