IRC log of #zope for Wednesday, 2011-08-03

*** digitalmortician has joined #zope00:06
*** digitalmortician has quit IRC00:07
*** TomBlockley has joined #zope00:10
*** J1m_ has quit IRC00:18
*** ajsmith has quit IRC00:24
*** TomBlockley has quit IRC00:34
*** davisagli has quit IRC00:36
*** davisagli has joined #zope00:37
*** RaceCondition has quit IRC01:06
*** davisagli has quit IRC01:12
*** davisagli has joined #zope01:13
*** davisagli has quit IRC01:21
*** davisagli has joined #zope01:22
*** m8 has quit IRC01:48
*** Arfrever has quit IRC02:05
*** zagy has quit IRC02:11
*** MrTango has quit IRC02:43
*** zagy has joined #zope03:03
*** sm_ has quit IRC03:10
*** Spanktar has quit IRC03:44
*** daMaestro has left #zope03:49
*** alga has quit IRC04:02
planetzopebotZope Z SQL Method returns empty column name for @@IDENTITY (active questions tagged zope - Stack Overflow)
*** Spanktar has joined #zope05:32
*** davisagli has quit IRC05:55
*** davisagli has joined #zope05:55
*** Spanktar has quit IRC05:55
*** davisagli has quit IRC05:56
*** davisagli has joined #zope05:57
*** Spanktar has joined #zope06:15
*** Spanktar has quit IRC06:17
*** davisagli has quit IRC06:56
*** davisagli has joined #zope06:57
*** zagy has quit IRC07:29
*** zagy has joined #zope07:29
*** srichter has quit IRC07:38
*** srichter has joined #zope07:39
*** redir is now known as redir__08:53
*** __mac__ has joined #zope09:01
*** sunew has joined #zope09:03
*** agroszer has joined #zope09:31
*** Wu has joined #zope09:49
*** J1m_ has joined #zope09:49
*** planetzopebot has quit IRC10:08
*** planetzopebot has joined #zope10:08
*** sunew has quit IRC10:08
*** goschtl has joined #zope10:10
*** sunew has joined #zope10:21
*** alga has joined #zope10:35
*** ccomb has joined #zope10:38
*** avoinea has joined #zope10:42
*** eperez has joined #zope10:49
*** TomBlockley has joined #zope10:50
*** Wu has quit IRC10:51
*** J1m_ has quit IRC10:57
*** MrTango has joined #zope11:00
Moo--I am reading Zope 2 documentation11:16
Moo--I hope someone could clarify this part:11:16
Moo--If the exception type is: “Redirect”, “Multiple Choices” “Moved Permanently”, “Moved Temporarily”, or “Not Modified”, and the exception value is an absolute URI, then no body will be provided and a ‘Location’ header will be included in the output with the given URI.11:16
Moo--what's "exception type" in this case11:17
betabugI guess something like `raise MovedPermanently, 'http://....'`11:19
betabugaccording to what it says in 4.11.9. Exceptions11:19
*** do3cc has joined #zope11:20
betabugmyself I always set the HTTP status code and other parameters on the RESPONSE object11:20
betabugwhich does the job just fine11:20
bigkevmcdthey do different things11:20
bigkevmcdone would result in the current transaction being rolled back, and the headers being set appropriately11:21
betabugdue to the exception11:21
bigkevmcdbetter to raise the exception11:21
betabughow's life bigkevmcd?11:21
bigkevmcdnot bad :-)11:21
bigkevmcdhow's .gr?11:23
bigkevmcdbetabug: what are you working on just now?11:24
betabugsomething like an online learning app11:24 is, well... taking a little rest till all hell breaks loose again11:24
betabugeverybody is on vacation :-)11:25
bigkevmcdhehe :-)11:27
bigkevmcdhah, I worked on an online learning and assessment engine about 11 years ago :-)11:27
bigkevmcdit's still around11:28
betabugyeah, I've worked for that company before, from ~ 1996 - 200111:30
*** mitchell`off is now known as mitchell11:50
Moo--how do I access the global app object?11:51
Moo--can I import it from somewhere?11:51
betabuguhm, you're on Zope 2 aren't you?11:51
betabugyou never need that there11:51
*** mitchell is now known as mitchell`11:51
Moo--betabug: I want to have a script in app level root11:51
Moo--betabug: Python script11:52
Moo--betabug: and call it if needed11:52
betabugso you want the root folder of the ZODB11:52
Moo--it must be in a global, right?11:52
betabugno, there is a method to get it, dunno right now the name11:53
Moo--betabug: yes. I love the documentation of Zope 2 for things like this.11:54
Moo--"grep through the code with random words and I hope you hit right one"11:54
*** RaceCondition has joined #zope11:54
betabugs/the code/the code from my Products/11:55
betabughmm, probably self.restrictedTraverse('/') should do the trick12:00
*** do3cc has quit IRC12:05
*** evilbungle has joined #zope12:08
*** menesis has quit IRC12:11
*** RaceCondition_ has joined #zope12:15
*** RaceCondition has quit IRC12:18
*** RaceCondition_ is now known as RaceCondition12:18
Solgemahello! i'm importing an plone site as .zexp file im my instance but I'm always getting "invalidations out of order, None < '\x03\x90\x1d\x8f\x87\x95\xd6\x99'"12:21
Solgemaany idea?12:21
*** ccomb has quit IRC12:24
*** do3cc has joined #zope12:25
*** __mac__ has quit IRC12:30
betabugyou need the exact same zope and plone versions for import to work12:32
betabugalso ask in #plone, since I don't know if import even works in plone - it used to be broken12:33
*** mr_jolly has joined #zope12:40
*** TomBlockley has quit IRC12:46
*** __mac__ has joined #zope12:47
*** menesis has joined #zope13:20
*** m8 has joined #zope13:20
*** Wu has joined #zope13:22
*** dayne has joined #zope13:50
*** J1m_ has joined #zope13:53
*** do3cc has quit IRC13:55
*** J1m_ has quit IRC14:00
*** J1m_ has joined #zope14:12
*** hariom has joined #zope14:27
*** J1m_ has quit IRC14:28
hariomI am showing the amount value in tal like this: <td tal:content="result/amount"/> . How to format this amount value to show only 2 decimal places. ?14:29
hariomcurrently if the amount is showing values like: 256.543114:29
betabuguse python, whereever you calculate "amount"14:29
hariombetabug: can you give example how? I am new to tal.14:30
betabugnot in tal14:30
betabugwhere does "amount" come from?14:30
hariombetabug: it is coming from zsql script14:32
Wu<td tal:content="python: result["amount"].split('.')[0] + result["amount"].split('.')[1][:2]"/>14:33
Wubut beware this is really ugly code14:33
Wuand it will fail if ammount is not a string containing the representation of a decimal/float number14:33
Wu(if it comes out of a zsql, it would be a string)14:34
*** do3cc has joined #zope14:34
Wuperhaps you could use round() on the string too14:34
Wumuch better:14:35
Wuhariom: <td tal:content="python: round(float(result["amount"]), 2)"/>14:35
hariomWu: Thank you. Trying it out.14:36
betabugusing floats is ugly anyway14:36
hariombetabug, Wu: Can't we use something like %0.2f14:37
Wudecimal is much better14:37
betabughariom: try it yourself14:37
Wuhariom: I don't think so, that notation is to use with print14:37
Wuand AFAIK you can't print inside a tal expression14:38
Wubut betabug is right, try it14:38
*** J1m_ has joined #zope14:55
RaceConditionwhy aren't marker interfaces persisted to ZODB and how to work around it?14:55
RaceConditionI mean, when I do directlyProvides(dbroot['foo'], IFooMarker), commit() and then reload, IFooMarker.providedBy(dbroot['foo']) => False14:57
evilbungleisn't it supposed to be alsoProvides?14:59
RaceConditionlet's see14:59
*** Wu has quit IRC14:59
RaceConditionalsoProvides and directyleProvides have "Declare interfaces declared directly for an object"15:00
RaceConditionbut I'll try it nevertheless15:00
RaceConditionokay, it worked now; thanks :)15:01
*** hariom has quit IRC15:02
RaceConditionwhat is the prupose of directlyProvides then?15:02
RaceConditionand alsoProvide's doccomment actually talks about directlyProvides15:03
*** J1m_ has quit IRC15:03
*** avoinea has quit IRC15:04
evilbungledunno, guess it's probably to do with the fact that directlyProvides overwrites the existing interfaces and alsoProvides adds new15:04
*** avoinea has joined #zope15:04
RaceConditionI see15:05
evilbunglemight be possible to make directlyprovides work with ob._p_changed=1 magic15:05
* evilbungle doesn't know for sure, just speculating15:05
RaceConditionoh, it's about that15:05
RaceConditionah, anyway, thanks again15:05
*** avoinea has quit IRC15:05
*** hariom has joined #zope15:15
*** avoinea has joined #zope15:20
*** avoinea has quit IRC15:27
*** avoinea has joined #zope15:29
*** do3cc has quit IRC15:32
RaceConditionis there a way to define an objects direct interfaces dynamically?15:33
RaceConditionsmth like getInterfaces()15:33
RaceConditionI need to set certain marker interfaces on objects directly based on their capabilities, so that later I can choose the right adapter, and setting/unsetting the interfaces as capabilities come and go seems less convenient/elegant than returning the interfaces on the fly15:34
gaweldirectlyProvides as I remeber15:34
RaceConditiondirectlyProvides/alsoProvides modifies the interfaces an object provides15:34
RaceConditionI'm asking about having the adapter registry query the object for its interfaces on the fly during adapter lookups15:35
*** Solgema has quit IRC15:35
*** Solgema has joined #zope15:36
*** J1m_ has joined #zope16:03
*** Solgema has quit IRC16:04
*** davisagli has quit IRC16:05
*** eperez has quit IRC16:05
*** Solgema has joined #zope16:05
*** hariom has quit IRC16:06
*** davisagli has joined #zope16:07
*** rbanffy has joined #zope16:11
*** ajsmith has joined #zope16:24
*** yvl has quit IRC17:09
*** Wu has joined #zope17:11
*** dayne has quit IRC17:11
*** yvl has joined #zope17:14
*** sp0cksbeard has quit IRC17:16
*** sp0cksbeard has joined #zope17:18
*** davisagli has quit IRC17:30
*** davisagli has joined #zope17:30
*** agroszer has quit IRC17:32
*** m8 has quit IRC17:36
*** sunew has quit IRC17:39
*** do3cc has joined #zope17:40
*** Illuminat23 has joined #zope17:51
*** goschtl has quit IRC17:55
Illuminat23Hi, i want to add an Object in an particular Database17:56
Illuminat23i hace diffrent databases and want to add an object like folder in an particular Database with the management interface17:56
Illuminat23I'm using zope2.10 with python2.517:57
planetzopebotHow to create an Object in an particular Database (active questions tagged zope - Stack Overflow)
Illuminat23my question ;)18:11
*** Solgema has quit IRC18:13
*** Solgema has joined #zope18:16
koshIlluminat23: I don't get what your question means at all18:19
koshnormall the ZODB is a tree based systems like the unix filesystem where databases are mounted at specific points18:19
koshso to create an object in a specific database you just create it inside wherever that database is mounted18:19
koshso if you have a database at a  /   one mounted at /foo and one mounted at /bar to create an item in the one mounted at /bar you just create the object inside /bar18:20
Illuminat23i have mountpoints all mounted on /mymount/YEAR like /mymount/2011, /mymount/201018:24
Illuminat23so i have for each year another database18:25
Illuminat23so i create a new database.fs and want to create an object in /mymount/ with the new database18:25
koshhow large are each of these databases?18:26
Illuminat23hm diffrent18:26
Illuminat23some mb up to some gb18:27
koshjust seems like a very strange design18:27
koshhowever since you only do this once per year automation seems largely pointless18:28
Illuminat23yep ;)18:28
Illuminat23thats why i want to do it at my own18:29
Illuminat23i did not design it ;) sry^^18:29
koshoh well I would create an entry in your zope.conf for that database connection and then inside your management interface use the ZODB Mount Point object to make sure it mounted correctly18:30
koshI have had to deal with worse designs18:30
koshI just wanted you to avoid that design if possible, but since you did not design it there is not much you can do18:30
Illuminat23i now it has work on a way that i can't figure out18:32
koshI don't get what you are saying18:32
Illuminat23this has be done since 200718:32
Illuminat23and now the guy who did this is not longer working in "my" company18:33
* kosh wonders if the design was on purpose18:33
*** __mac__ has quit IRC18:39
*** ccomb has joined #zope18:42
*** zagy has quit IRC18:44
*** Illuminat23 has quit IRC18:52
*** tiwula has joined #zope19:07
*** chaoflow has quit IRC19:13
*** Solgema has quit IRC19:14
*** chaoflow has joined #zope19:15
*** chaoflow has quit IRC19:20
*** chaoflow has joined #zope19:20
*** Spanktar has joined #zope19:35
*** do3cc has quit IRC19:38
*** davisagli has quit IRC19:53
*** davisagli has joined #zope19:53
*** Wu has quit IRC19:54
*** menesis has quit IRC20:01
*** mitchell` is now known as mitchell`off20:02
*** giampaolo has joined #zope20:03
*** agroszer has joined #zope20:06
*** agroszer has quit IRC20:19
*** Solgema has joined #zope20:21
*** evilbungle has quit IRC20:30
*** menesis has joined #zope20:48
*** menesis has quit IRC20:49
*** menesis has joined #zope20:50
*** evilbungle has joined #zope20:56
*** evilbungle has quit IRC20:56
*** evilbungle has joined #zope20:57
*** evilbungle has quit IRC20:57
*** giampaolo has quit IRC21:00
*** avoinea has quit IRC21:02
*** __mac__ has joined #zope21:21
*** TresEquis has joined #zope21:31
*** Solgema has quit IRC21:57
RaceConditionis there a way to tell ZODB to ignore, i.e. not persist a particular attribute of a Persistent object?22:36
*** rbanffy has quit IRC22:56
*** Arfrever has joined #zope22:58
*** Solgema has joined #zope23:05
*** m8 has joined #zope23:08
*** tiwula has quit IRC23:11
*** rbanffy has joined #zope23:18
koshmake the attribute _v_ that will make it volatile so it is not stored23:20
koshso someobject._v_foobie for instance23:20
*** r0ver has joined #zope23:26
*** r0ver has quit IRC23:30
*** r0ver has joined #zope23:31
*** r0ver has quit IRC23:32
*** r0ver has joined #zope23:35
*** r0ver has quit IRC23:39
*** ajsmith has quit IRC23:39
*** r0ver has joined #zope23:39
*** r0ver has quit IRC23:40
*** r0ver has joined #zope23:41
*** srichter has quit IRC23:44
*** r0ver has quit IRC23:45
*** r0ver has joined #zope23:45
*** r0ver has quit IRC23:48
*** r0ver has joined #zope23:48
*** r0ver has quit IRC23:50
*** r0ver has joined #zope23:51
*** Solgema has quit IRC23:59

Generated by 2.15.1 by Marius Gedminas - find it at!