*** whit has quit IRC | 00:01 | |
*** agroszer_ has quit IRC | 00:07 | |
*** davisagli has quit IRC | 00:07 | |
*** menesis has joined #zope3-dev | 00:10 | |
*** ignas has quit IRC | 00:11 | |
*** Rolando has joined #zope3-dev | 00:13 | |
*** Rolando has quit IRC | 00:14 | |
*** Rolando has joined #zope3-dev | 00:15 | |
*** reco has joined #zope3-dev | 00:26 | |
*** malthe|away is now known as malthe | 00:28 | |
*** malthe is now known as malthe|Zzz | 00:39 | |
*** davisagli has joined #zope3-dev | 00:49 | |
*** cshenton has quit IRC | 00:54 | |
*** Rolando has quit IRC | 00:59 | |
*** jamur2 has quit IRC | 01:15 | |
*** menesis has quit IRC | 01:19 | |
*** runyaga has quit IRC | 01:30 | |
*** lurkymclurkleton has quit IRC | 01:33 | |
*** jpcw has quit IRC | 01:37 | |
*** sunew has quit IRC | 01:54 | |
*** andycat has joined #zope3-dev | 01:58 | |
*** lucielejard has quit IRC | 02:28 | |
*** reco has quit IRC | 02:33 | |
*** nathany has quit IRC | 02:37 | |
*** junkafarian has joined #zope3-dev | 02:38 | |
*** whit has joined #zope3-dev | 02:54 | |
*** rmarianski has quit IRC | 02:54 | |
*** fmail has joined #zope3-dev | 03:21 | |
*** J1m has quit IRC | 03:22 | |
*** benji has quit IRC | 03:32 | |
*** greenman has quit IRC | 03:38 | |
*** aaronv has quit IRC | 03:39 | |
*** aaronv has joined #zope3-dev | 03:40 | |
*** greenman has joined #zope3-dev | 03:41 | |
*** davisagli has left #zope3-dev | 04:01 | |
*** junkafarian has quit IRC | 04:05 | |
*** brandon_rhodes has quit IRC | 04:06 | |
*** whit has quit IRC | 04:08 | |
*** reco has joined #zope3-dev | 04:10 | |
*** rmarianski has joined #zope3-dev | 04:38 | |
*** strichter has quit IRC | 04:49 | |
*** davisagli has joined #zope3-dev | 04:58 | |
*** aaronv has quit IRC | 05:19 | |
*** stub has joined #zope3-dev | 05:45 | |
*** reco has quit IRC | 05:55 | |
*** reco has joined #zope3-dev | 05:58 | |
*** binseer has joined #zope3-dev | 06:42 | |
*** baijum has joined #zope3-dev | 06:58 | |
*** MrSipan has joined #zope3-dev | 07:10 | |
*** ktwilight_ has joined #zope3-dev | 07:16 | |
*** MrSipan has quit IRC | 07:17 | |
*** fmail has left #zope3-dev | 07:19 | |
*** ktwilight_ has quit IRC | 07:24 | |
*** ktwilight_ has joined #zope3-dev | 07:24 | |
*** afd_ has joined #zope3-dev | 07:26 | |
*** ktwilight has quit IRC | 07:28 | |
*** davisagli has left #zope3-dev | 07:30 | |
*** greenman has quit IRC | 07:31 | |
*** rmarianski has quit IRC | 07:46 | |
*** davisagli has joined #zope3-dev | 08:02 | |
*** pcardune has joined #zope3-dev | 08:35 | |
*** fmail has joined #zope3-dev | 08:38 | |
*** fmail has left #zope3-dev | 08:39 | |
*** fairwinds has quit IRC | 08:41 | |
*** jayaraj has joined #zope3-dev | 08:41 | |
*** __mac__ has joined #zope3-dev | 08:45 | |
*** jukart has joined #zope3-dev | 08:51 | |
*** srichter has joined #zope3-dev | 08:54 | |
*** baijum has quit IRC | 08:55 | |
*** baijum has joined #zope3-dev | 08:56 | |
*** nyo1 has quit IRC | 08:59 | |
*** pcardune has quit IRC | 09:06 | |
*** srichter has quit IRC | 09:08 | |
*** srichter has joined #zope3-dev | 09:08 | |
*** projekt01 has joined #zope3-dev | 09:09 | |
*** quodt has joined #zope3-dev | 09:11 | |
*** baijum has quit IRC | 09:18 | |
*** JaRoel|4D has quit IRC | 09:21 | |
*** nyo1 has joined #zope3-dev | 09:31 | |
*** basti__ has joined #zope3-dev | 09:35 | |
*** davisagli_ has joined #zope3-dev | 09:36 | |
*** nyo2 has joined #zope3-dev | 09:40 | |
*** nyo1 has quit IRC | 09:40 | |
*** Theuni has joined #zope3-dev | 09:48 | |
*** davisagli has quit IRC | 09:52 | |
*** baijum has joined #zope3-dev | 10:03 | |
*** JaRoel|4D has joined #zope3-dev | 10:08 | |
*** JaRoel|4_ has joined #zope3-dev | 10:13 | |
*** jpcw has joined #zope3-dev | 10:17 | |
*** pelle_ has joined #zope3-dev | 10:18 | |
*** pyqwer has joined #zope3-dev | 10:18 | |
*** strichter has joined #zope3-dev | 10:20 | |
*** srichter has quit IRC | 10:20 | |
*** strichter is now known as srichter | 10:20 | |
*** ChanServ sets mode: +o srichter | 10:20 | |
*** harobed has joined #zope3-dev | 10:28 | |
*** mkerrin has joined #zope3-dev | 10:28 | |
*** stub has quit IRC | 10:28 | |
*** stub has joined #zope3-dev | 10:29 | |
*** greenman has joined #zope3-dev | 10:30 | |
*** regebro has joined #zope3-dev | 10:33 | |
*** jayaraj has quit IRC | 10:35 | |
*** jayaraj has joined #zope3-dev | 10:35 | |
*** agroszer has joined #zope3-dev | 10:35 | |
*** JaRoel|4D has quit IRC | 10:37 | |
*** MJ has joined #zope3-dev | 10:38 | |
*** zagy has quit IRC | 10:40 | |
*** danfairs has joined #zope3-dev | 10:45 | |
*** zagy has joined #zope3-dev | 10:46 | |
*** junkafarian has joined #zope3-dev | 10:46 | |
*** harobed has quit IRC | 10:49 | |
*** davisagli_ has quit IRC | 10:59 | |
*** yotaff has quit IRC | 11:00 | |
*** yotaff has joined #zope3-dev | 11:00 | |
*** davisagli_ has joined #zope3-dev | 11:00 | |
*** fRiSi has joined #zope3-dev | 11:08 | |
*** VladDrac has left #zope3-dev | 11:18 | |
*** hipertracker has joined #zope3-dev | 11:19 | |
*** baijum has quit IRC | 11:22 | |
*** baijum has joined #zope3-dev | 11:24 | |
*** malthe|Zzz is now known as malthe | 11:28 | |
*** malthe has quit IRC | 11:39 | |
*** malthe has joined #zope3-dev | 11:40 | |
*** mgedmin has joined #zope3-dev | 11:44 | |
*** davisagli_ has left #zope3-dev | 11:53 | |
*** tarek has joined #zope3-dev | 12:02 | |
*** jpcw has quit IRC | 12:07 | |
*** jpcw has joined #zope3-dev | 12:08 | |
*** iham|away is now known as iham | 12:13 | |
*** afd_ has quit IRC | 12:31 | |
*** junkafarian_ has joined #zope3-dev | 12:38 | |
*** junkafarian_ is now known as junk|work | 12:39 | |
*** jhauser has joined #zope3-dev | 12:52 | |
*** harobed has joined #zope3-dev | 12:54 | |
pyqwer | Hi, does anyone know how to migrate data from one ZODB to another? My first attempt was to open both databases and simply set a reference from the first data to the second, but that fails: InvalidObjectReference: Attempt to store an object from a foreign database connection | 12:56 |
---|---|---|
srichter | pyqwer: look at the zodbconvert script in RelStorage | 12:57 |
nyo2 | pyqwer: I also successfully used export/import features | 12:57 |
srichter | it also works from FielStorage to FileStoragfe | 12:57 |
pyqwer | nyo2: What export/import features are that? | 12:58 |
pyqwer | Are they part of the ZODB package? | 12:58 |
nyo2 | pyqwer: ZODB's standard ones | 12:59 |
nyo2 | the Connection class inherits from ExportImport class | 12:59 |
nyo2 | pyqwer: that has exportFile | 12:59 |
nyo2 | method | 12:59 |
nyo2 | it event exports blobs | 12:59 |
pyqwer | nyo2: Ok, so I could export all my data as blobs (e.g. into a string) and reimport it in the other database. | 12:59 |
nyo2 | pyqwer: you basically export an object to a ZEXP file and then can import it in another db | 13:00 |
nyo2 | pyqwer: but note, that if your object has __parent__ pointing to some other object, there's a big chance that all ZODB contents will be exported :) | 13:01 |
pyqwer | Hmmm, that's bad. | 13:02 |
mgedmin | heh | 13:02 |
nyo2 | pyqwer: about blobs i meant that it can pack Blob instances to the ZEXP file | 13:02 |
pyqwer | My exact problem is that when switching from Zope3-tar.gz distrib to KGS something is different/went wrong and I cannot access my views and data (due to access restrictions). | 13:02 |
pyqwer | So my idea was, to recreate my whole site and simply export/import the low-level data. | 13:02 |
nyo2 | pyqwer: i just temporarily removed the __parent__ from the object for exporting, but that's ugly solution I think | 13:03 |
pyqwer | Hmmm, what about simply doing a dumps(mydata)? | 13:04 |
pyqwer | And export/import data like that? That should omit the __parent__ problem. | 13:04 |
nyo2 | pyqwer: i don't think it would work ))) i don't know much about ZODB internals though. if you have blob objects, simple dumps won't work definetely for them) | 13:05 |
pyqwer | Hmmm. | 13:05 |
*** markusleist has quit IRC | 13:05 | |
nyo2 | pyqwer: i needed a quick solution for moving data, so I just saved parent to a temporary variable, cleared it for exported objects, committed transaction, exported it and then restored its parent and committing transaction again))) | 13:07 |
nyo2 | pyqwer: sounds lame, but worked for my simple case | 13:07 |
pyqwer | nyo2: Ok, I think I'll try that, too. | 13:07 |
pyqwer | Thanks! | 13:07 |
nyo2 | pyqwer: np. however, I'd like to hear more opinions on that topic | 13:07 |
*** aaronv has joined #zope3-dev | 13:08 | |
*** MrTopf has joined #zope3-dev | 13:10 | |
*** junk|work is now known as Singletonedeaf | 13:19 | |
pyqwer | nyo2: Hmmm, how would I use that ExportImport? I tried the following: from ZODB import ExportImport; e=ExportImport();e.exportFile('myoid'); But that gives me: AttributeError: ExportImport instance has no attribute '_storage' | 13:20 |
nyo2 | pyqwer: that is a mix-in class. | 13:23 |
nyo2 | pyqwer: your ZODB connection object inherits it | 13:23 |
pyqwer | Ah, ok. | 13:23 |
*** binseer_ has joined #zope3-dev | 13:23 | |
nyo2 | pyqwer: something like that here: obj._p_jar.exportFile(obj._p_oid) | 13:24 |
nyo2 | pyqwer: (that returns a resulting file object) | 13:25 |
pyqwer | nyo2: Ok, yes, that seems to work, now there's the __parent__ problem as it exports everything... ;-) | 13:27 |
*** Singletonedeaf is now known as junk|work | 13:27 | |
nyo2 | pyqwer: yep | 13:27 |
*** menesis has joined #zope3-dev | 13:28 | |
*** baijum has quit IRC | 13:28 | |
mgedmin | it'd be nice if exportFile() supported something like copy.deepcopy()'s memo argument | 13:30 |
*** jukart has quit IRC | 13:30 | |
mgedmin | or pluggable custom copy-vs-don't-copy logic of some kind | 13:30 |
nyo2 | mgedmin: yeah, that'd be just great ) | 13:31 |
pyqwer | nyo2: Hmmm, I did something like that: myobj.temp_parent=myobj.__parent__; myobj.__parent__ = None and exported it then, but this seems to make not much difference as everything is still exported? | 13:31 |
nyo2 | pyqwer: because you are storing it in your object | 13:32 |
mgedmin | maybe there are other references to the great outside? | 13:32 |
mgedmin | oh, duh | 13:32 |
nyo2 | pyqwer: so it's still linked to the parent, but with another attribute name. | 13:32 |
*** reco has quit IRC | 13:32 | |
pyqwer | nyo2: Hmmm, not that I know, but its referenced in an index, perhaps that's a problem? | 13:34 |
nyo2 | pyqwer: no :) | 13:35 |
*** jayaraj has quit IRC | 13:35 | |
nyo2 | pyqwer: your object are still pointing to the parent, but with temp_parent attribute instead of __parent__ that is the same to ZODB | 13:36 |
nyo2 | pyqwer: just save parent into temporary in-memory variable, not object's attribute | 13:36 |
pyqwer | nyo2: Yep, I recognized that and just set the __parent__ = None for now, without backing up. | 13:36 |
nyo2 | pyqwer: well, if you don't need to restore it, you can just set it to None of course) | 13:36 |
pyqwer | Yes, I can easily set it to its parent when importing it manually in the new container. | 13:37 |
nyo2 | pyqwer: i mean restoring its original state in the source database | 13:38 |
*** Theuni1 has joined #zope3-dev | 13:38 | |
pyqwer | nyo2: Ok, yes, but I don't need to commit, thus its not important, I assume? | 13:38 |
*** greenman has quit IRC | 13:38 | |
nyo2 | pyqwer: IIRC, you need to commit it, because exportFile function only reads committed data) | 13:39 |
nyo2 | pyqwer: so if you won't commit, the __parent__ won't be set to None) | 13:39 |
pyqwer | Ah! So that's the reason! | 13:39 |
*** greenman has joined #zope3-dev | 13:39 | |
nyo2 | pyqwer: yep, iirc | 13:39 |
pyqwer | Yes, now it seems to work. | 13:40 |
*** greenman has quit IRC | 13:41 | |
*** binseer__ has joined #zope3-dev | 13:47 | |
*** binseer has quit IRC | 13:47 | |
*** Theuni has quit IRC | 13:48 | |
*** binseer__ is now known as binseer | 13:48 | |
*** binseer__ has joined #zope3-dev | 13:56 | |
*** olavgg has quit IRC | 13:58 | |
*** olavgg has joined #zope3-dev | 13:59 | |
nyo2 | mgedmin: what do you think about simply adding a "skip" argument to the exportFile that contains a sequence of oids that are not written in the export file? | 14:06 |
*** mintsauce has joined #zope3-dev | 14:08 | |
*** binseer_ has quit IRC | 14:10 | |
pyqwer | nyo2: Btw., that trick seems to have done it, I still have some issues with the index, but I think I'll be able to fix that. | 14:10 |
mintsauce | With much kind assistance from the channel I managed to display a Choice vocabulary with RadioWidgets earlier in the week: form_fields['foo'].custom_widget = CustomWidgetFactory(RadioWidget) | 14:11 |
mintsauce | next question is, can i do the same with Checkboxes? :D | 14:11 |
pyqwer | mintsauce: That's formlib, not z3c.form, right? | 14:12 |
mintsauce | Before you ask: form_fields['foo'].custom_widget = CustomWidgetFactory(CheckBoxWidget) returns TypeError: __init__() takes exactly 3 arguments (4 given) | 14:12 |
mintsauce | pyqwer: yup, formlib | 14:12 |
nyo2 | mintsauce: oh that zope.app.form's magic with auto-detecting collection fields... | 14:13 |
nyo2 | mintsauce: that thing needs to be looked at) | 14:13 |
mintsauce | nyo2: errr ... can I get round the 'magic' ? | 14:13 |
mintsauce | Will it be happier with single terms in the vocab? I currently pass the standard 3 terms (as if it was a dropdown) | 14:15 |
nyo2 | mintsauce: you are using zope.app.form.browser.itemswidgets.RadioWidget, right? | 14:16 |
nyo2 | ah.. | 14:17 |
nyo2 | mintsauce: ignore that, i need to get some sleep) | 14:17 |
mintsauce | from zope.app.form.browser import RadioWidget | 14:17 |
nyo2 | mintsauce: you need checkboxes now) | 14:17 |
mintsauce | nyo2: yup - different data to that which I was working on earlier in the week ;) | 14:18 |
*** binseer has quit IRC | 14:18 | |
nyo2 | mintsauce: you need to do multiple select with checkboxes? | 14:18 |
nyo2 | mintsauce: then you need a MultiCheckBoxWidget for that, if i remember correctly | 14:19 |
*** jukart has joined #zope3-dev | 14:19 | |
nyo2 | mintsauce: 'cause ``CheckboxWidget`` is for boolean fields | 14:19 |
mintsauce | nyo2: suspected that, but thought I could override it as we did with RadioWidget - will give it a try | 14:20 |
nyo2 | mintsauce: btw, MultiCheckBoxWidget are used for List fields with Choice as its value_type | 14:21 |
*** baijum has joined #zope3-dev | 14:21 | |
mintsauce | My default for Choice seems to be drop downs .. | 14:21 |
*** malthe is now known as malthe|away | 14:22 | |
nyo2 | mintsauce: because it's only for one value, while multicheckboxes is for multiple values) | 14:23 |
nyo2 | mintsauce: so you can use select or radio widgets for single value Choice fields, and multiple-selects or multicheckbox widgets for lists of selectable values) | 14:23 |
*** jayaraj has joined #zope3-dev | 14:24 | |
mintsauce | Ahh - i see | 14:24 |
*** menesis has left #zope3-dev | 14:24 | |
*** binseer__ is now known as binseer | 14:24 | |
*** menesis has joined #zope3-dev | 14:24 | |
mintsauce | just tested: form_fields['foo'].custom_widget = CustomWidgetFactory(MultiCheckBoxWidget) it's exactly what i was after - thanks for the help | 14:26 |
nyo2 | mintsauce: np) | 14:27 |
*** alga has joined #zope3-dev | 14:45 | |
*** sunew has joined #zope3-dev | 14:46 | |
mintsauce | I'm trying to access context.request.principal, but keep getting a ForbiddenAttribute error - can i get round this with removeSecurityProxy? | 14:46 |
pyqwer | Hmmm, shouldn't it be self.request.principal? | 14:47 |
pyqwer | (in the view) | 14:47 |
mintsauce | ahh .. hang on, i know what I'm doing wrong | 14:48 |
mintsauce | trying to get it as if it was a view - but it's not, its a zodb object | 14:48 |
mintsauce | ignore me, can get what i want a better way :) | 14:48 |
*** fairwinds has joined #zope3-dev | 14:52 | |
*** pelle_ has quit IRC | 15:00 | |
*** jukart has quit IRC | 15:06 | |
*** pelle_ has joined #zope3-dev | 15:15 | |
*** benji has joined #zope3-dev | 15:21 | |
*** __mac__ has quit IRC | 15:26 | |
jayaraj | mintsauce :) | 15:26 |
*** baijum has quit IRC | 15:35 | |
*** cshenton has joined #zope3-dev | 15:37 | |
*** brandon_rhodes has joined #zope3-dev | 15:46 | |
*** mgedmin has quit IRC | 15:48 | |
*** mgedmin has joined #zope3-dev | 15:48 | |
*** jpcw has quit IRC | 15:48 | |
*** menesis has quit IRC | 15:49 | |
*** binbrain_ has joined #zope3-dev | 15:58 | |
*** jamur2 has joined #zope3-dev | 16:01 | |
*** jpcw has joined #zope3-dev | 16:01 | |
*** menesis has joined #zope3-dev | 16:02 | |
*** mintsauce has quit IRC | 16:02 | |
*** lurkymclurkleton has joined #zope3-dev | 16:03 | |
*** J1m has joined #zope3-dev | 16:04 | |
*** pelle_ has quit IRC | 16:04 | |
*** binbrain has quit IRC | 16:15 | |
*** pelle_ has joined #zope3-dev | 16:18 | |
*** sp0cksbeard has joined #zope3-dev | 16:41 | |
*** binbrain_ has quit IRC | 16:43 | |
*** sunew has quit IRC | 16:49 | |
*** binseer has quit IRC | 16:51 | |
*** __mac__ has joined #zope3-dev | 16:56 | |
*** reco has joined #zope3-dev | 16:58 | |
*** J1m has quit IRC | 17:02 | |
*** srichter has quit IRC | 17:05 | |
*** srichter has joined #zope3-dev | 17:07 | |
pyqwer | Does someone know if/when this silly issue with setuptools + svn 1.5 will be fixed? | 17:07 |
*** basti__ has quit IRC | 17:08 | |
benji | pyqwer: I believe it already has been | 17:08 |
benji | try upgrading setuptools | 17:08 |
pyqwer | benji: Wow, that would be great, I'll try, thanks! | 17:09 |
*** J1m has joined #zope3-dev | 17:09 | |
*** mintsauce has joined #zope3-dev | 17:10 | |
*** kleist has joined #zope3-dev | 17:13 | |
mintsauce | Having problems with my earlier Choice as MultiCheckBoxWidget - it's returning an error on submit - TypeError: 'NoneType' object is not callable - zope.app.form-3.7.0-py2.5.egg/zope/app/form/browser/itemswidgets.py", line 212, in _toFieldValue | 17:14 |
*** MatthewWilkes has joined #zope3-dev | 17:15 | |
mintsauce | Which I've traced back to class MultiDataHelper | 17:15 |
mintsauce | "Mix-in helper class for getting the term from the HTML form." | 17:15 |
mintsauce | "All AbstractCollection fields have a `_type` attribute specifying the type of collection." | 17:16 |
kleist | hello all, when using zope.interface 3.5.0 with the -3 flag of python 2.6, i get deprecation warnings... | 17:16 |
kleist | ... Overriding __eq__ blocks inheritance of __hash__ in 3.x | 17:16 |
mintsauce | MatthewWilkes: :) | 17:16 |
kleist | ... I guess reporting in launchpad is _not_ appropriate? | 17:16 |
MatthewWilkes | mintsauce: hi | 17:17 |
MatthewWilkes | kleist: Well, it is a Python 2 package, they're not actually bugs. That said, a working version for Python 3 would be cool | 17:20 |
kleist | thanx MatthewWilkes, I did suspect that raising an issue wouldn't be appreciated | 17:22 |
MatthewWilkes | kleist: Don't get me wrong, I'm certainly interested in the warnings | 17:24 |
MatthewWilkes | kleist: I've heard people talking about Zope2 python3 compatibility which would require zope.interface (and plenty more) | 17:25 |
kleist | MatthewWilkes: here? | 17:25 |
kleist | MatthewWilkes: you want it informally, here? | 17:25 |
MatthewWilkes | No, I'm sure there's loads all over the place | 17:25 |
kleist | actually, i'm using z.i indirectly via "twisted" | 17:26 |
mintsauce | do i need a value_type attribute? | 17:28 |
*** sp0cksbeard has left #zope3-dev | 17:33 | |
*** cshenton_ has joined #zope3-dev | 17:34 | |
mgedmin | MatthewWilkes: well, if we have a class that overrides __eq__ and doesn't override __hash__, it might be considered a bug, if you look at it just right | 17:37 |
mgedmin | and talk very fast | 17:37 |
mgedmin | a == b is supposed to imply hash(a) == hash(b) | 17:37 |
mgedmin | or Things Will Break Badly when you use a as a dictionary key and then try to look up b | 17:37 |
mgedmin | if nobody ever uses those objects as dictionary keys (or set items), it doesn't really matter | 17:38 |
mintsauce | Comment in offending code in itemswidgets.py : "If the value_type is None we may fall over. We may not be able to do any better than that." | 17:38 |
*** fRiSi has quit IRC | 17:38 | |
mgedmin | pyqwer: setuptools 0.6c9 has the svn 1.5 fix | 17:39 |
*** MJ has quit IRC | 17:41 | |
kleist | mgedmin: exactly! http://docs.python.org/whatsnew/2.6.html | 17:42 |
MatthewWilkes | mgedmin: Yeah, I think that's specified as a bug in the docs, now I think about it | 17:43 |
kleist | ... "set __hash__ = None to indicate that the class isn’t hashable ... You should do this when you’ve defined a __cmp__() or __eq__() method that compares objects by their value" | 17:43 |
mgedmin | 'should' is the right word for this | 17:44 |
kleist | ... I get the DeprecationWarning for advice.py line 129 | 17:45 |
MatthewWilkes | "The only required property is that objects which compare equal have the same hash value" - If __eq__ has been overridden it may well no longer fit that property | 17:45 |
pyqwer | mgedmin: Wow, great! At last! | 17:45 |
mgedmin | pyqwer: it happened last year :-) | 17:46 |
pyqwer | Interesting, never noticed, but searched quite often. | 17:46 |
*** quodt has quit IRC | 17:48 | |
*** srichter has quit IRC | 17:49 | |
mintsauce | How would I set a value_type for my Choice schema field? This seems to be what's breaking. | 17:49 |
*** srichter has joined #zope3-dev | 17:49 | |
*** danfairs has quit IRC | 17:50 | |
*** cshenton has quit IRC | 17:51 | |
lisppaste6 | mintsauce pasted "Schema Problem" at http://paste.lisp.org/display/73642 | 17:52 |
*** stub has quit IRC | 17:57 | |
projekt01 | mintsauce, you are trying to use a sequence widget for a non sequence field | 17:57 |
projekt01 | Choice is not a sequence | 17:58 |
*** nathany_ has joined #zope3-dev | 17:58 | |
*** srichter has quit IRC | 17:58 | |
*** srichter has joined #zope3-dev | 17:58 | |
mintsauce | I'd like to use CheckBoxWidgets with a vocabulary (although I can make it a list or dict if that makes life easier) - is this possible? | 17:59 |
mintsauce | Basically - list of names from zodb - want to display as checkboxes | 17:59 |
projekt01 | You can define a List of Choice | 17:59 |
mintsauce | List *of* Choice? | 17:59 |
projekt01 | stati = zope.schema.List( | 18:00 |
projekt01 | title=_(u'Stati'), | 18:00 |
projekt01 | description=_(u'The stati of the application.'), | 18:00 |
projekt01 | value_type=zope.schema.Choice(vocabulary=StatusVocabulary), | 18:00 |
projekt01 | required=True, | 18:00 |
projekt01 | default=None) | 18:00 |
projekt01 | something like that? | 18:01 |
projekt01 | the widget should work out of the box for such a field construct | 18:01 |
*** rmarianski has joined #zope3-dev | 18:07 | |
*** binbrain has joined #zope3-dev | 18:10 | |
*** pcardune has joined #zope3-dev | 18:18 | |
mintsauce | projekt01: for term in self.vocabulary: TypeError: 'Choice' object is not iterable | 18:19 |
projekt01 | da stimmt was nicht mit dem setup. Choice selbst hat keine terms sondern das vocabulary in widget.vocabulary | 18:21 |
mintsauce | projekt01: Been a while since i had to speak German - 'Something wasn't in the setup, Choice has no terms in the vocab?' ;) | 18:23 |
projekt01 | ;-) | 18:23 |
*** jayaraj has quit IRC | 18:24 | |
projekt01 | Thre something wrong with the field setup. The choice has no terms, the vocabulary in widget.vocabulary has terms | 18:24 |
projekt01 | mintsauce, something iterates the widget but should iterate the vocabulary | 18:25 |
mintsauce | Ahh .... im supplying terms from a dict - but that dict may be empty .... | 18:25 |
projekt01 | mintsauce, something iterates the FIELD but should iterate the vocabulary | 18:25 |
projekt01 | do you have a dict of terms? | 18:26 |
projekt01 | mintsauce, replace that dict of terms with a zope.schema.vocabulary.SimpleVocabulary | 18:27 |
mintsauce | This is what im currenlty using: terms = [SimpleTerm(x.keys()[0], x.keys()[0], x.keys()[0]) for x in foolist] | 18:28 |
mintsauce | which is super-classed to SimpleVocabulary | 18:28 |
projekt01 | take a look at SimpleVocabulary, you can create one with a list of terms like you have | 18:28 |
*** rocky1 has joined #zope3-dev | 18:28 | |
*** rocky has quit IRC | 18:29 | |
projekt01 | mintsauce, your problem ist probably different since it says Choice is not iterable during Terms lookup | 18:30 |
projekt01 | make sure that widget.vocabulary exists and it should work with default widgets, skip the custom widget factory part | 18:31 |
*** projekt01 has quit IRC | 18:33 | |
*** rocky1 is now known as rocky | 18:33 | |
*** kleist has quit IRC | 18:34 | |
*** sunew has joined #zope3-dev | 18:34 | |
*** malthe|away is now known as malthe | 18:35 | |
mintsauce | it works without the custom widget factory, just not with ... | 18:36 |
*** nyo2 has quit IRC | 18:38 | |
*** sunew has quit IRC | 18:40 | |
*** sunew has joined #zope3-dev | 18:40 | |
binbrain | there doesn't seem to be a way to override the @@contents.html template for the containerView. How do you do that? | 18:46 |
*** pyqwer has quit IRC | 18:49 | |
mgedmin | augh! | 18:53 |
* mgedmin can't get rid of the habit of using ctrl-v s | 18:53 | |
mgedmin | which means something completely different if you've got surround.vim :( | 18:53 |
*** menesis has quit IRC | 18:55 | |
*** menesis1 has joined #zope3-dev | 18:55 | |
*** menesis1 is now known as menesis | 18:55 | |
*** menesis has left #zope3-dev | 18:57 | |
*** strichter has joined #zope3-dev | 18:58 | |
*** menesis has joined #zope3-dev | 18:59 | |
*** jhauser has quit IRC | 18:59 | |
*** menesis has quit IRC | 19:00 | |
*** menesis has joined #zope3-dev | 19:05 | |
*** mintsauce has quit IRC | 19:06 | |
*** menesis has left #zope3-dev | 19:06 | |
*** JaRoel|4_ has quit IRC | 19:09 | |
*** srichter has quit IRC | 19:13 | |
*** davisagli has joined #zope3-dev | 19:14 | |
*** menesis has joined #zope3-dev | 19:18 | |
*** menesis has quit IRC | 19:20 | |
*** menesis has joined #zope3-dev | 19:20 | |
*** __mac__ has quit IRC | 19:23 | |
*** J1m has quit IRC | 19:25 | |
*** malthe is now known as malthe|away | 19:30 | |
*** hipertracker has quit IRC | 19:31 | |
*** TheSkrill has joined #zope3-dev | 19:31 | |
*** regebro has quit IRC | 19:39 | |
*** pcardune has quit IRC | 19:46 | |
*** TheSkrill has left #zope3-dev | 19:47 | |
*** mkerrin has quit IRC | 19:56 | |
*** afd_ has joined #zope3-dev | 19:58 | |
*** junk|work has quit IRC | 20:09 | |
*** jhauser has joined #zope3-dev | 20:15 | |
*** nyo1 has joined #zope3-dev | 20:20 | |
*** mgedmin has quit IRC | 20:23 | |
*** J1m_ has joined #zope3-dev | 20:37 | |
*** nyo1 has quit IRC | 20:40 | |
*** MatthewWilkes has quit IRC | 20:40 | |
*** J1m_ has quit IRC | 20:42 | |
*** J1m_ has joined #zope3-dev | 20:42 | |
*** JaRoel|4D has joined #zope3-dev | 20:47 | |
*** alga has quit IRC | 20:56 | |
*** jpcw_ has joined #zope3-dev | 20:59 | |
*** jpcw has quit IRC | 21:00 | |
*** Theuni1 has quit IRC | 21:02 | |
*** cshenton has joined #zope3-dev | 21:08 | |
*** sunew has quit IRC | 21:08 | |
*** sunew has joined #zope3-dev | 21:09 | |
*** __mac__ has joined #zope3-dev | 21:11 | |
*** __mac__ has quit IRC | 21:17 | |
*** jhauser has quit IRC | 21:20 | |
*** menesis has quit IRC | 21:20 | |
*** cshenton_ has quit IRC | 21:24 | |
*** quodt has joined #zope3-dev | 21:24 | |
*** philiKON_ has joined #zope3-dev | 21:31 | |
*** harobed has quit IRC | 21:39 | |
*** MrTopf has quit IRC | 21:41 | |
*** Theuni has joined #zope3-dev | 21:44 | |
*** philiKON has quit IRC | 21:49 | |
*** jpcw_ has left #zope3-dev | 21:50 | |
*** jpcw has joined #zope3-dev | 21:51 | |
*** strichter is now known as srichter | 21:53 | |
*** ChanServ sets mode: +o srichter | 21:53 | |
*** TresEquis has joined #zope3-dev | 21:56 | |
*** pcardune has joined #zope3-dev | 21:59 | |
*** vimes656 has joined #zope3-dev | 22:04 | |
*** sunew has quit IRC | 22:04 | |
*** vimes656 has quit IRC | 22:06 | |
*** vimes656 has joined #zope3-dev | 22:06 | |
*** aaronv has quit IRC | 22:18 | |
*** VladDrac has joined #zope3-dev | 22:19 | |
*** aaronv has joined #zope3-dev | 22:22 | |
*** vimes656 has quit IRC | 22:25 | |
*** vimes656 has joined #zope3-dev | 22:25 | |
*** vimes656 has quit IRC | 22:29 | |
*** vimes656 has joined #zope3-dev | 22:30 | |
*** lucielejard has joined #zope3-dev | 22:31 | |
*** junkafarian has quit IRC | 22:35 | |
*** J1m_ has quit IRC | 22:51 | |
*** J1m_ has joined #zope3-dev | 22:52 | |
*** J1m_ has quit IRC | 22:58 | |
*** J1m_ has joined #zope3-dev | 22:59 | |
*** markusleist has joined #zope3-dev | 23:00 | |
*** afd_ has quit IRC | 23:00 | |
*** vimes656 has quit IRC | 23:04 | |
*** jhauser has joined #zope3-dev | 23:04 | |
*** vimes656 has joined #zope3-dev | 23:07 | |
*** malthe|away is now known as malthe | 23:09 | |
VladDrac | 9 | 23:12 |
*** Theuni has quit IRC | 23:15 | |
*** nathany_ has quit IRC | 23:16 | |
*** davisagli_ has joined #zope3-dev | 23:22 | |
*** harobed has joined #zope3-dev | 23:22 | |
Fubar^ | You guessed wrong, the correct number is 4! | 23:23 |
*** pelle_ has quit IRC | 23:24 | |
Vq^ | i would never have guessed that... | 23:37 |
*** davisagli has quit IRC | 23:39 | |
*** davisagli_ is now known as davisagli | 23:39 | |
*** jhauser has quit IRC | 23:48 | |
*** cshenton has quit IRC | 23:51 | |
*** runyaga has joined #zope3-dev | 23:56 | |
*** nathany_ has joined #zope3-dev | 23:57 | |
*** reco has quit IRC | 23:57 |
Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!