*** timte has quit IRC | 00:02 | |
*** jfroche has quit IRC | 00:04 | |
*** pelle_ has joined #zope3-dev | 00:17 | |
*** d2m has quit IRC | 00:44 | |
*** yota has quit IRC | 00:49 | |
*** pelle_ has quit IRC | 00:53 | |
*** elro has joined #zope3-dev | 01:11 | |
*** Jell-O-Fishi has joined #zope3-dev | 02:11 | |
*** projekt01 has quit IRC | 02:22 | |
*** natea|tipisprint has quit IRC | 02:42 | |
*** benji has joined #zope3-dev | 02:52 | |
*** foxmjay has quit IRC | 03:02 | |
*** elro has quit IRC | 04:03 | |
*** alecm has joined #zope3-dev | 04:58 | |
*** alecm has quit IRC | 05:00 | |
*** stub has joined #zope3-dev | 05:19 | |
*** alga has quit IRC | 06:05 | |
*** pcardune has joined #zope3-dev | 08:01 | |
*** afd_ has joined #zope3-dev | 08:06 | |
*** stub has quit IRC | 08:31 | |
*** stub has joined #zope3-dev | 08:32 | |
*** sorin_ has joined #zope3-dev | 08:38 | |
*** sorin_ is now known as sorindregan | 08:39 | |
*** srichter has joined #zope3-dev | 08:59 | |
*** ChanServ sets mode: +o srichter | 08:59 | |
*** d2m has joined #zope3-dev | 09:32 | |
*** schwendinger has joined #zope3-dev | 09:33 | |
*** baijum has joined #zope3-dev | 09:34 | |
*** ktwilight_ has quit IRC | 09:35 | |
*** sm has joined #zope3-dev | 09:36 | |
*** ktwilight_ has joined #zope3-dev | 09:38 | |
*** b52Centos has joined #zope3-dev | 09:55 | |
*** b52GM has quit IRC | 10:09 | |
*** yvl has quit IRC | 10:12 | |
*** yvl has joined #zope3-dev | 10:13 | |
*** ghendi has joined #zope3-dev | 10:20 | |
*** jfroche has joined #zope3-dev | 10:43 | |
*** yota has joined #zope3-dev | 10:43 | |
*** alga has joined #zope3-dev | 10:45 | |
*** Aiste has joined #zope3-dev | 10:46 | |
*** harobed has joined #zope3-dev | 10:53 | |
*** ccomb has joined #zope3-dev | 10:55 | |
*** Jell-O-Fishi has quit IRC | 10:59 | |
*** bigkevmcd has joined #zope3-dev | 11:07 | |
*** srichter has quit IRC | 11:21 | |
*** tarek has joined #zope3-dev | 11:24 | |
*** MJ|nearby has joined #zope3-dev | 11:27 | |
*** MJ|nearby is now known as MJ | 11:28 | |
*** yvl has quit IRC | 11:46 | |
*** alga has quit IRC | 11:55 | |
*** ktwilight has joined #zope3-dev | 12:02 | |
*** dennis__ has joined #zope3-dev | 12:05 | |
*** sm is now known as sm-afk | 12:15 | |
*** ktwilight_ has quit IRC | 12:16 | |
*** roym` has joined #zope3-dev | 12:36 | |
*** regebro has joined #zope3-dev | 12:39 | |
regebro | Hiya all! Quick Qestions: How do I best use testbrowser to test that somethindg DOESN'T work? | 12:40 |
---|---|---|
*** pelle_ has joined #zope3-dev | 12:40 | |
regebro | I wanna check that a user is not allowed to do something. I tried failUnlessRaises(HTTPError), but its still prints out the Unauthorized error to stdout. Not nice. | 12:41 |
*** projekt01 has joined #zope3-dev | 12:48 | |
*** pelle_ has quit IRC | 12:51 | |
*** roym has quit IRC | 12:52 | |
regebro | OK, I'm rephrasing the question after having looked some more: | 12:53 |
*** pelle_ has joined #zope3-dev | 12:53 | |
regebro | Is there a good way of using testbrowsers when NOT using doctests? | 12:53 |
regebro | That is, getting is NOT to print out exceptions to stdurl? | 12:54 |
*** timte has joined #zope3-dev | 12:54 | |
regebro | stdout I mean. | 12:54 |
*** deo has joined #zope3-dev | 12:59 | |
*** dunny has quit IRC | 13:08 | |
projekt01 | regebro, I don't understand what you mean. What do you like to do? | 13:20 |
regebro | I'd like to NOT have my test print out Unautorized errors to stdout when I run the test. | 13:21 |
regebro | projekt01: I have just figured out it's actually the Zope2 publisher doing this, not the test-browser. | 13:21 |
projekt01 | regebro, you can enable or diesable errors handling in test browser like: | 13:24 |
projekt01 | browser = Browser | 13:24 |
projekt01 | browser.handleErrors = False | 13:24 |
regebro | oh, isn't handleErrors a method? | 13:26 |
projekt01 | I guess not, the sample above works in our tests | 13:26 |
regebro | OK, trying. | 13:29 |
regebro | projekt01: Thanks, that may be useful, but I still get the error printed out to stdout. | 13:33 |
regebro | I think I need to set up a testing config or something, which sucks. | 13:33 |
projekt01 | If you set handleErrors = False the errors will get handled by the system error view, with handleErrors=True the errors will and as a TraceBack in the doctest. | 13:35 |
projekt01 | Do you have a error view regsitered for the error you get in the doctest? | 13:36 |
regebro | doctests are for testing documentation. :) | 13:36 |
regebro | I'm not doing that. | 13:36 |
projekt01 | do you get a TraceBack in the test? | 13:38 |
regebro | Yup. | 13:38 |
projekt01 | You can catch them with three dots TraceBack ... ValueError or something like that | 13:38 |
*** seizure has joined #zope3-dev | 13:39 | |
regebro | But I'm not using doctests. | 13:40 |
projekt01 | What kind of test are you using | 13:40 |
regebro | A normal unittest. | 13:41 |
*** ignas has joined #zope3-dev | 13:41 | |
projekt01 | does assertRaises not work? | 13:41 |
regebro | Yes it does. But Zope prints out a traceback to stdout. I'm trying to get rid of it, | 13:42 |
projekt01 | Huh, on a new trunk? | 13:42 |
regebro | I think I need to set up a testing config or something, which sucks. | 13:42 |
projekt01 | Are you testing views in unit tests? | 13:44 |
regebro | I'm not sure I understand the question. How would use use views in unit tests? What does that mean= | 13:45 |
regebro | ? | 13:45 |
regebro | Geez, I cant read. | 13:46 |
regebro | You say TESTING, not using. | 13:46 |
regebro | Currently no. | 13:46 |
regebro | Or, well, possible, yes. Depending on your view. | 13:46 |
projekt01 | Hm, curios, I guess you have to find out what is printing the error to stdout | 13:47 |
regebro | I am using the testbrowser to test functional functionality in unit tests, yes. | 13:47 |
regebro | Yeah, I'm trying... | 13:47 |
projekt01 | If you test views, it's probably a missing view which handles the errors. | 13:47 |
*** seizure has left #zope3-dev | 13:49 | |
regebro | No, I just need Zope to stop logging to stdout, I think. it's a test.conf or something? | 13:52 |
regebro | Trying to google, but failing. | 13:52 |
CrippsFX | stdout and stderr are *pretty much* the same. They sure look the same ... try running with "2>/dev/null" on the end of bin/runzope, and see if you still get the errors printing to "stdout" | 13:55 |
*** pcardune_ has joined #zope3-dev | 13:56 | |
CrippsFX | morning paul | 13:56 |
CrippsFX | morning projekt01 :) | 13:56 |
regebro | CrippsFX: That's not the issue. The issue is getting Zope to stop printing it. | 13:56 |
regebro | If it's stdout or stderr I don't really care. | 13:57 |
*** pelle_ has quit IRC | 13:57 | |
CrippsFX | regebro: what I proposed was a command line redirect. It will take stderr and pipe it to null. You won't see it. | 13:57 |
regebro | Yeah, but I want to see stdout and stderr. | 13:57 |
CrippsFX | regebro: python takes care of printing all the message you see on the command line. | 13:57 |
CrippsFX | regebro: you want to see stdout and stderr, but you don't want to see them on the command line? | 13:58 |
regebro | I repeat: This is not the issue. The issue is getting rid of one specific thing thats gets printed. | 13:58 |
CrippsFX | okay. I'll go away since I obviously don't know what's going on. | 13:59 |
CrippsFX | :) | 13:59 |
regebro | projekt01: You were onto something, It does not print the error when failing. It prints the error when failing to handle the error. I'll set up the site to handle the error properly, and it should be hunky dory, I hope, | 14:04 |
*** benji has quit IRC | 14:08 | |
projekt01 | See zope.publisher.pulish.py line 140, I guess this happens in your case. | 14:12 |
*** pcardune has quit IRC | 14:14 | |
*** MJ is now known as MJ|lunch | 14:49 | |
*** grahal has joined #zope3-dev | 14:54 | |
*** alga has joined #zope3-dev | 14:57 | |
*** Aiste has quit IRC | 15:05 | |
CrippsFX | man ... I'm getting some weird error ... I have a Computer object that I'm trying to use ... I took off the constraint for Computer to be held in ComputerFolder, and I'm trying to add it to the ZODB root via the ZMI, but I get the error located here: http://www.pastebin.ca/536461 ... it seems the containment machinery hates me. Does anyone have any insight as to what's wonky here? More information is available upon request. | 15:10 |
*** niemeyer has joined #zope3-dev | 15:12 | |
*** Aiste has joined #zope3-dev | 15:12 | |
dennis__ | Crippsfx if you are following the wc book example, it worked fine for me :) so must be some small config error | 15:12 |
CrippsFX | dennis__: yeah, I am following the WC example. | 15:12 |
CrippsFX | more or less ... | 15:12 |
dennis__ | can be many things gone wrong, can you show the interfaces for computer and computerfolder ? | 15:13 |
CrippsFX | dennis__: yeah, just a few moments, I'll pastebin them. | 15:14 |
CrippsFX | dennis__: http://www.pastebin.ca/536474 | 15:15 |
*** benji has joined #zope3-dev | 15:15 | |
CrippsFX | morning benji | 15:15 |
benji | morning | 15:16 |
CrippsFX | dennis__: the only way I can see something going wrong is if something is trying to access Computer.__parent__ directly ... but the containment machinery should automatically say "hey, this is a non-locatable object ... let's wrap it in a containment proxy" | 15:16 |
CrippsFX | :/ | 15:16 |
dennis__ | you are omitten __parent__ and __name__ from your forms ? | 15:16 |
dennis__ | *omitting | 15:16 |
CrippsFX | dennis__: no need for them. | 15:16 |
dennis__ | why is line 52 commented out ? | 15:17 |
CrippsFX | dennis__: I wanted to remove the containmetn constraint for testing purposes. | 15:17 |
CrippsFX | s/containmetn/containment | 15:17 |
dennis__ | in your Computer object, after implements( IComputer ), do you set __name__ = __parent__ = None ? | 15:18 |
CrippsFX | dennis__: no ... | 15:18 |
CrippsFX | I'll try that. | 15:18 |
dennis__ | page 290 | 15:19 |
dennis__ | line 8 | 15:19 |
dennis__ | :) | 15:19 |
dennis__ | in example 15.3.4 | 15:19 |
CrippsFX | ah, well I'll be damned. Thanks fir your eyes dennis__ :) | 15:20 |
CrippsFX | s/fir/for | 15:20 |
CrippsFX | too many typos this morning ... it's 10:00 and I'm almost done my second cup o' coffee :P | 15:20 |
CrippsFX | dennis__: beauty. | 15:22 |
benji | CrippsFX: must be in Greenland (or his clock is wrong <wink>) | 15:25 |
CrippsFX | benji: why what time does it say I am? | 15:25 |
benji | you said 10:00 about 5 minutes ago | 15:26 |
CrippsFX | benji: nope ... I'm not in Greenland ... it's 10:30 there ... :P | 15:26 |
CrippsFX | I'm in Newfoundland | 15:26 |
benji | close enough <wink> | 15:27 |
CrippsFX | for a nuke, yes :D | 15:27 |
benji | not quite | 15:27 |
* benji lives near Washington D.C., so he's thought about things like nuke radii | 15:28 | |
CrippsFX | hahaha ... wait ... that's not funny. | 15:28 |
CrippsFX | I don't think a Nuclear winter could make it any colder here anyways. | 15:28 |
CrippsFX | ... might make it drier ... that would be nice. | 15:28 |
*** thruflo has joined #zope3-dev | 15:30 | |
* thruflo waves to * | 15:31 | |
* CrippsFX waves to thruflo | 15:31 | |
thruflo | hey CrippsFX :) | 15:32 |
CrippsFX | brb | 15:32 |
*** MJ|lunch is now known as MJ | 15:35 | |
* CrippsFX is back | 15:42 | |
*** elro has joined #zope3-dev | 15:52 | |
*** Newfie2007 has joined #zope3-dev | 15:59 | |
*** marianom has joined #zope3-dev | 16:02 | |
*** regebro has left #zope3-dev | 16:08 | |
*** baijum has quit IRC | 16:17 | |
*** whit has joined #zope3-dev | 16:21 | |
*** stub has quit IRC | 16:23 | |
*** schwendinger has quit IRC | 16:23 | |
*** schwendinger has joined #zope3-dev | 16:23 | |
*** meatballhat has joined #zope3-dev | 16:29 | |
CrippsFX | when I register an "addMenuItem" using a class to create a Computer Object (via the zmi) the menu item shows up at the zmi root, but when I use a factory it shows up where it's supposed to (in the ComputerFolder container). When I add at the top level it fails because of containment constraints ... but here's the weird part ... using the class, I get the add form, which I want, but using the factory I don't get the add form, which is bad. | 16:32 |
CrippsFX | ahh .. I know what I need to do, I need to make an adapter, or a utility that grabs the form template ... | 16:35 |
*** tonico has joined #zope3-dev | 16:39 | |
*** nerdalert has joined #zope3-dev | 16:43 | |
*** natea|tipisprint has joined #zope3-dev | 16:48 | |
*** sorindregan has quit IRC | 16:56 | |
CrippsFX | hehehe ... PFM ... | 17:04 |
*** whit has quit IRC | 17:04 | |
*** pelle_ has joined #zope3-dev | 17:05 | |
CrippsFX | I tried registering my browser.ComputerAdd class as a factory, but that didn't work, and when I pulled it out, the factory (that I had tried before) gave me an addform precisely where I wanted. | 17:05 |
*** pcardune_ has quit IRC | 17:07 | |
*** sorin has joined #zope3-dev | 17:10 | |
*** sorin is now known as sorindregan | 17:11 | |
*** pelle_ has quit IRC | 17:11 | |
*** stub has joined #zope3-dev | 17:11 | |
*** sorindregan has quit IRC | 17:19 | |
*** afd__ has joined #zope3-dev | 17:21 | |
*** pelle_ has joined #zope3-dev | 17:23 | |
*** afd_ has quit IRC | 17:36 | |
*** ghendi has quit IRC | 17:38 | |
*** reco has joined #zope3-dev | 17:41 | |
CrippsFX | pelle_: you at a sprint? | 17:45 |
pelle_ | CrippsFX: yes at the piktipi | 17:46 |
CrippsFX | pelle_: good on ya :) | 17:46 |
pelle_ | and you :) | 17:46 |
CrippsFX | pelle_: I'm not sprinting, but I help when I can :) | 17:46 |
*** mgedmin has joined #zope3-dev | 17:47 | |
CrippsFX | morning mgedmin | 17:47 |
*** whit has joined #zope3-dev | 17:49 | |
*** afd__ has quit IRC | 17:50 | |
*** pelle_ has quit IRC | 18:10 | |
*** pelle_ has joined #zope3-dev | 18:13 | |
*** sm-afk is now known as sm | 18:23 | |
*** elro has quit IRC | 18:52 | |
*** elro_ has joined #zope3-dev | 18:52 | |
*** elro_ is now known as elro | 18:52 | |
*** projekt01 has quit IRC | 18:57 | |
*** pelle_ has quit IRC | 19:03 | |
*** natea|tipisprint has quit IRC | 19:08 | |
*** natea|tipisprint has joined #zope3-dev | 19:10 | |
*** pelle_ has joined #zope3-dev | 19:11 | |
*** tonico has quit IRC | 19:13 | |
*** BjornT_ has quit IRC | 19:30 | |
*** MJ has quit IRC | 19:33 | |
*** schwendinger has quit IRC | 19:38 | |
*** Jell-O-Fishi has joined #zope3-dev | 19:50 | |
* CrippsFX beats his head against NameChooser | 20:02 | |
mgedmin | NameChoosers are great | 20:02 |
mgedmin | well, passable | 20:02 |
mgedmin | okay, I can just about live with them :) | 20:03 |
CrippsFX | hahaha ... I got it ... | 20:04 |
CrippsFX | my implementation is kind of messy though ... | 20:04 |
CrippsFX | mgedmin: basically, using uuid for names ... I really see no need for checkName in this case because name will never be user specified ... and I don't want 3 args for chooseName because I want to set Computer.uuid through the name chooser. | 20:05 |
CrippsFX | but, I have something that works, so I should stop complaining :P | 20:05 |
CrippsFX | correction ... I do *not* have something that works. | 20:06 |
* CrippsFX sighs | 20:06 | |
rocky | hm... do any of you ever try to attach docstrings to your schema attribute definitions? and if so... how do you normally do that? | 20:10 |
benji | duct tape | 20:12 |
rocky | lol | 20:12 |
rocky | seriously tho, is it possible? | 20:12 |
rocky | i mean sometimes the "description" attribute of my field is good enough, in this case it is not | 20:13 |
benji | schema fields (or all the ones I know of at least) have a description parameter to their constructor | 20:13 |
benji | oh | 20:13 |
benji | I suppose you could assign __doc__ if you really felt like it | 20:13 |
*** harobed has quit IRC | 20:13 | |
rocky | benji: the problem is that in this case, i'd like the description to be something user friendly ...something a user editing a form would like to see... where as i'd like the docstring to indicate some specific detail about what the field is itnended for | 20:14 |
benji | I'd normally put that in a comment, but if you have some tool extracting docstrings, then assigning to __doc__ is your best bet | 20:15 |
benji | if you do it much you could have a wrapper function so you could do foo = doc(zope.schema.Foo(...), "big long docstring") | 20:15 |
rocky | mostly i'd like to use a docstring in case someone is inspecting code and doing help() | 20:16 |
rocky | but a comment is probably the path of least resistance ;) | 20:16 |
benji | attr = zope.schema.Foo(...) | 20:16 |
benji | attr.__doc__ = "..." | 20:17 |
benji | looks pretty good to me | 20:17 |
rocky | right | 20:17 |
rocky | true | 20:17 |
benji | (if there's not some reason that won't work) | 20:17 |
rocky | regarding your previous comment, about making a doc() method ... do python descriptors work on any arbitrary class attribute or just function/method declarations? | 20:17 |
benji | I'm not an expert in that area, but I don't think there's anything special about method handling there. | 20:18 |
CSWookie | I tried to do it once and ran into strangeness, as I recall. I don't remember what it was. Maybe it involved help(class). | 20:20 |
rocky | well, if it did wouldn't class descriptors work? | 20:20 |
rocky | (which don't, as we know) | 20:20 |
*** alecm has joined #zope3-dev | 20:20 | |
*** yvl has joined #zope3-dev | 20:21 | |
*** RaFromBRC has joined #zope3-dev | 20:23 | |
*** meatballhat has left #zope3-dev | 20:24 | |
*** nerdalert_ has joined #zope3-dev | 20:27 | |
*** goplus has joined #zope3-dev | 20:29 | |
*** goplus has left #zope3-dev | 20:32 | |
*** Jell-O-Fishi has quit IRC | 20:38 | |
*** stub has quit IRC | 20:40 | |
*** jrc2e has joined #zope3-dev | 20:42 | |
*** nerdalert has quit IRC | 20:43 | |
*** Aiste has quit IRC | 20:44 | |
*** RaFromBRC has quit IRC | 20:45 | |
*** RaFromBRC has joined #zope3-dev | 20:47 | |
*** alga has quit IRC | 20:55 | |
*** pelle_ has quit IRC | 21:13 | |
*** natea|tipisprint is now known as natea|dinner | 21:16 | |
*** schwendinger has joined #zope3-dev | 21:22 | |
*** ignas has quit IRC | 21:24 | |
*** schwendinger_ has joined #zope3-dev | 21:44 | |
sm | g'day all. What can cause CRITICAL txn.65540 A storage error occurred during the second phase of the two-phase commit. , other than not enough disk space ? | 21:50 |
sm | I observe this with zope2/zeo but found no help on #zope | 21:51 |
sm | any pointers welcome | 21:51 |
mgedmin | isn't there a traceback in one of the log files? | 21:52 |
CrippsFX | well ... I'm headed out for the night. I'll be back in the morning. Ciao. | 21:53 |
sm | mgedmin: I guess there is.. I assumed it was from a second, follow-up error | 21:55 |
lisppaste6 | sm pasted "storage error" at http://paste.lisp.org/display/42233 | 21:56 |
mgedmin | hm | 21:56 |
mgedmin | tpc_finish is the second phase of the two-phase commit, I think | 21:56 |
mgedmin | so it could be the error | 21:56 |
sm | ok, that helps | 21:57 |
mgedmin | unless there's another traceback above, with ore or less the same timestamp? | 21:57 |
sm | no, that's all | 21:57 |
mgedmin | what's Module ZEO.cache, line 375, in invalidate? | 21:57 |
mgedmin | what does the assert look like? | 21:57 |
benji | assert o is not None | 21:57 |
benji | (on the trunk, that is) | 21:58 |
sm | yes.. after o = self.fc.access((oid, cur_tid)) | 21:58 |
benji | the comment above "access" says "Return Object for key, or None if not in cache." | 21:59 |
sm | hmm | 22:00 |
*** schwendinger has quit IRC | 22:00 | |
*** Newfie2007 has left #zope3-dev | 22:00 | |
* benji reenters lurk mode as his ZODB knowlege is now exhausted | 22:00 | |
* mgedmin has considerably less ZODB knowledge compared to benji | 22:01 | |
sm | you moved me forward.. thanks :) | 22:01 |
mgedmin | sm: you could ask on the ZODB mailing list | 22:01 |
mgedmin | people with ZODB knowledge tend to lurk there | 22:02 |
sm | thx, I think I might need to | 22:02 |
*** schwendinger_ is now known as schwendinger | 22:02 | |
mgedmin | I'd suspect either a bug in ZODB/ZEO, or some hardware fault (flipping a random bit in memory that just happens to be an oid, or something) | 22:02 |
benji | sm: if you're _really_ lucky and have a small database you're willing to make public (or semi-public) and can reproduce this problem with it, someone might dissect it for you | 22:03 |
*** schwendinger_ has joined #zope3-dev | 22:03 | |
*** pelle_ has joined #zope3-dev | 22:06 | |
*** pelle_ has quit IRC | 22:13 | |
*** thruflo has left #zope3-dev | 22:14 | |
*** pelle_ has joined #zope3-dev | 22:19 | |
*** schwendinger has quit IRC | 22:20 | |
*** schwendinger has joined #zope3-dev | 22:21 | |
*** schwendinger_ has quit IRC | 22:24 | |
*** afd__ has joined #zope3-dev | 22:24 | |
*** scherand has joined #zope3-dev | 22:41 | |
*** scherand has left #zope3-dev | 22:41 | |
*** nerdalert_ is now known as nerdalert | 22:46 | |
*** sm is now known as sm-afk | 22:52 | |
*** cr3 has joined #zope3-dev | 22:53 | |
rocky | hm, did vocabulary factories exist < zope 3.3 ? | 22:55 |
*** schwendinger_ has joined #zope3-dev | 22:57 | |
cr3 | utilities/i18nextract.py doesn't seem to be extracting the html tags marked as i18n:translate="" in my .pt files. might I be missing something? | 22:57 |
rocky | nvm it does | 22:58 |
cr3 | nvm for me too :) I need to specify the i18n:domain in each .pt file | 22:59 |
mgedmin | yes | 23:00 |
mgedmin | about vocabulary factories existing in older zopes | 23:01 |
rocky | ok how bout this one, what's the standard way to provide a vocabulary to zope.schema.Set ? | 23:03 |
rocky | for a widget, obviously | 23:03 |
mgedmin | my_field = Set(value_type=Choice(vocabulary=...)) | 23:04 |
mgedmin | iirc | 23:04 |
mgedmin | I don't remember how usable are the default Set widgets | 23:04 |
mgedmin | don't be surprised if they store lists rather than sets in your data objects | 23:05 |
rocky | hehe ok | 23:06 |
*** pelle_ has quit IRC | 23:08 | |
mgedmin | if I have a long-running request, is there any way to dribble data to the client side? | 23:12 |
*** dunny has joined #zope3-dev | 23:12 | |
*** schwendinger has quit IRC | 23:14 | |
*** pelle_ has joined #zope3-dev | 23:16 | |
*** RaFromBRC is now known as RaFromBRC|lunch | 23:19 | |
mgedmin | obviously 11pm is not the best time for questions like this... | 23:19 |
dennis__ | mgedmin can you have the data in a file like object? tempfile or stringio or such? | 23:21 |
cr3 | how do I change the language used by zope to render pages to the language of the user? | 23:22 |
dennis__ | oops no not strinio, must be a file | 23:22 |
mgedmin | I'm calculating some statistics for several thousand objects from the ZODB | 23:22 |
mgedmin | I know how many objects there are, so I would like to show some AJAX-y progress bar | 23:22 |
dennis__ | hmm easy way is polling, i don't know how to make zope flush its output buffers and return content of unknown length | 23:23 |
dennis__ | sorry :( | 23:23 |
mgedmin | WSGI has something for this, I think | 23:23 |
mgedmin | instead of returning a string you write a generator that yields the bits when they're ready | 23:24 |
mgedmin | or I could have the client poll for the progress, but for that I'd need some way to track what's happening in a request currently being processed in another thread from another transaction | 23:24 |
*** pelle_ has quit IRC | 23:24 | |
dennis__ | would make an interesting howto when you figure it out | 23:25 |
mgedmin | hey, I've got a blog | 23:25 |
mgedmin | I could write about this if I ever figure it out | 23:25 |
dennis__ | ah yeah i remember :) | 23:26 |
dennis__ | please do | 23:26 |
* mgedmin loves ezmerge.py | 23:27 | |
*** pelle_ has joined #zope3-dev | 23:29 | |
*** pelle_ has quit IRC | 23:30 | |
*** pelle_ has joined #zope3-dev | 23:31 | |
dennis__ | hmm if i have a site with a menu bar at the top for main navigation, and add an entry for for example "News", which should just go to /News/index.html, what do I put in the zcml? a template or a class? the context should be the "News" object of the site. Basically I would like to just have a URL there? anyone have any nice examples? | 23:46 |
dennis__ | (using browser:menu and browser:page) | 23:46 |
mgedmin | probably a <browser:menuItem> | 23:54 |
dennis__ | do you know an example somewhere which uses its own menus? (ie not zmi?) | 23:55 |
ccomb | you probably don't need anything if your menu is generated from the list of folders | 23:55 |
*** mgedmin has quit IRC | 23:56 | |
dennis__ | you mean like a viewlet with some view code which returns the list of folders and a template which puts it in a list? | 23:57 |
ccomb | yes | 23:57 |
ccomb | you can also select which folders to include in the menu by putting a marker interface on them | 23:57 |
ccomb | (or any attribute) | 23:58 |
dennis__ | currently i was trying to have the respective folders (news, articles, etc) to add themselves to a global nav menu. Your suggestion would work fine too (actually better :). Just wondering what the correct way to use the menus is | 23:58 |
*** afd__ has quit IRC | 23:59 | |
ccomb | i think zcml menuItem is better for things like action menus or add menus | 23:59 |
Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!