IRC log of #zope3-dev for Wednesday, 2009-01-28

*** sparcd has joined #zope3-dev00:06
*** povbot has joined #zope3-dev01:06
whit(uuid are used to expose atom resources in this case)01:06
whitbasically: import uuid; id_ = str(uuid.uuid1())01:07
whitwill give you a unique identifier01:07
*** Theuni has quit IRC01:08
*** redir`` is now known as redir01:09
sparcdcool, and I can use that in my NameChooser01:11
sparcdcool: e848da0f-ecc7-11dd-a174-00233299c0f101:12
sparcdmight have to make the NameChooser come up with 1,2,3... etc01:13
*** alga has joined #zope3-dev01:14
sparcdif you were to give a nice unique number to say a person, or a client, or a group, how would you have it? eight random digits? 63339639?01:19
sparcdor start and 1 and count up?01:20
*** nathany has quit IRC01:21
*** jamur2 has quit IRC01:25
sparcdwhit: the next thing on my mammoth zope 3 quest is a local role adapter. Any pointers?01:27
*** malthe is now known as malthe|Zzz01:38
*** J1m has quit IRC01:44
pcardunesparcd: depending on what your application does, it is typically not a good idea to use a counter because it is less scalable than uuids01:51
sparcdpcardune: true01:51
sparcdpcardune: doesn't look so good on the URL though01:51
*** dbfrombrc has joined #zope3-dev01:54
*** lurkymclurkleton has quit IRC01:55
*** jhauser has quit IRC02:07
*** nathany has joined #zope3-dev02:18
whitsparcd: iirc02:28
sparcdwhit: thanks - digging around now02:28
whitthe securitypolicy.txt doctest is the key to understanding local roles02:28
*** troter has joined #zope3-dev02:32
*** whit has quit IRC02:36
sparcdnite all03:06
*** reco has quit IRC03:06
*** sparcd has quit IRC03:07
*** junkafarian_ has quit IRC03:15
*** ktwilight has quit IRC03:35
*** ktwilight has joined #zope3-dev03:36
*** greenman has joined #zope3-dev03:38
*** aaronv has joined #zope3-dev03:38
*** rmarianski has quit IRC03:40
*** aaronv has quit IRC03:41
*** davisagli has left #zope3-dev03:45
*** nathany has quit IRC03:59
*** davisagli has joined #zope3-dev04:12
*** binbrain_ has joined #zope3-dev04:35
*** ktwilight_ has joined #zope3-dev04:51
*** ktwilight has quit IRC05:05
*** alga has quit IRC05:07
*** stub has joined #zope3-dev05:18
*** whit has joined #zope3-dev05:30
*** whit has quit IRC05:35
*** pcardune_ has joined #zope3-dev05:49
*** pcardune_ has quit IRC05:51
*** greenman has quit IRC05:51
*** pcardune has quit IRC05:52
*** stub has quit IRC06:04
*** stub has joined #zope3-dev06:05
*** binseer has joined #zope3-dev06:15
*** whit has joined #zope3-dev06:29
*** whit has quit IRC06:30
*** davisagli has quit IRC06:39
*** pcardune has joined #zope3-dev06:50
*** vimes656 has joined #zope3-dev07:05
*** davisagli has joined #zope3-dev07:09
*** baijum has joined #zope3-dev07:14
*** dbfrombrc has quit IRC07:20
*** jamur2 has joined #zope3-dev07:35
*** jamur2 has quit IRC07:54
*** afd__ has joined #zope3-dev08:15
*** jukart has quit IRC08:20
*** agroszer_ has joined #zope3-dev08:36
*** thekryz has joined #zope3-dev08:36
*** jukart has joined #zope3-dev08:42
*** thekryz has quit IRC08:48
*** thekryz has joined #zope3-dev08:49
*** romanofski has quit IRC08:50
*** thekryz has quit IRC08:52
*** thekryz has joined #zope3-dev08:59
*** JaRoel|4D has quit IRC09:05
*** agroszer_ is now known as agroszer09:09
*** jhauser has joined #zope3-dev09:11
*** vimes656 has quit IRC09:16
*** zagy has quit IRC09:22
*** thekryz has left #zope3-dev09:24
*** Theuni has joined #zope3-dev09:37
*** zagy has joined #zope3-dev09:40
*** basti__ has joined #zope3-dev09:43
*** fairwinds has quit IRC09:49
*** JaRoel|4D has joined #zope3-dev09:51
*** brandon_rhodes has joined #zope3-dev09:55
*** davisagli has left #zope3-dev10:03
*** junkafarian has joined #zope3-dev10:04
*** mkerrin has joined #zope3-dev10:11
*** afd___ has joined #zope3-dev10:12
*** quodt has joined #zope3-dev10:13
*** fairwinds has joined #zope3-dev10:13
*** fairwinds has quit IRC10:14
*** afd__ has quit IRC10:27
*** goschtl has joined #zope3-dev10:40
*** basti__ has quit IRC10:43
*** tarek has joined #zope3-dev10:45
*** Rolando has joined #zope3-dev10:45
*** pcardune has quit IRC10:47
*** basti__ has joined #zope3-dev10:49
*** MrTopf has joined #zope3-dev10:49
*** harobed_ has joined #zope3-dev10:49
*** rocky1 has joined #zope3-dev10:50
*** pyqwer has joined #zope3-dev10:51
*** junkafarian has quit IRC10:52
*** thekryz has joined #zope3-dev10:53
*** kaeru has quit IRC10:59
*** jpcw has joined #zope3-dev11:00
*** rocky has quit IRC11:03
*** jayaraj has joined #zope3-dev11:09
*** toutpt has joined #zope3-dev11:11
*** afd___ has quit IRC11:12
*** malthe|Zzz is now known as malthe11:19
*** zagy has quit IRC11:19
*** zagy has joined #zope3-dev11:19
*** pelle_ has joined #zope3-dev11:21
*** nyo has joined #zope3-dev11:25
*** iham|away has quit IRC11:41
*** nyo has quit IRC11:44
*** MJ has joined #zope3-dev11:44
*** yotaff has joined #zope3-dev11:46
*** afd___ has joined #zope3-dev11:48
*** kaeru has joined #zope3-dev11:55
*** kaeru has quit IRC11:56
*** nyo has joined #zope3-dev12:09
*** thekryz is now known as dojo12:15
*** dojo is now known as thekryz12:15
*** brandon_rhodes has quit IRC12:26
*** brandon_rhodes has joined #zope3-dev12:30
danfairsHi - which package defines the standard permissions used in the default zope security policy (zope.View, zope.ManageContent) etc? I want to find a complete list of what's available by default.12:32
danfairsFound it -'s configure.zcml. Makes sense!12:36
*** Fubar^ has joined #zope3-dev12:37
*** iham has joined #zope3-dev12:47
*** thekryz has left #zope3-dev12:50
*** andycat has quit IRC13:03
*** troter has quit IRC13:12
*** goschtl has quit IRC13:19
*** andycat has joined #zope3-dev13:19
*** kaeru has joined #zope3-dev13:20
*** thetet has joined #zope3-dev13:23
*** dunny has quit IRC13:28
*** junkafarian has joined #zope3-dev13:47
*** JaRoel|4_ has joined #zope3-dev13:48
*** rocky1 is now known as rocky13:49
*** stub has quit IRC13:51
*** afd___ has quit IRC13:59
*** JaRoel|4D has quit IRC14:05
*** andycat has quit IRC14:15
*** aaronv has joined #zope3-dev14:16
*** fairwinds has joined #zope3-dev14:21
*** sparcd has joined #zope3-dev14:25
*** afd___ has joined #zope3-dev14:30
*** projekt01 has joined #zope3-dev14:32
*** menesis has joined #zope3-dev14:43
*** sparcd has quit IRC14:49
*** sparcd has joined #zope3-dev14:55
*** olavgg1 has quit IRC15:17
*** olavgg1 has joined #zope3-dev15:17
*** baijum has quit IRC15:21
*** olavgg1 has quit IRC15:31
*** olavgg1 has joined #zope3-dev15:32
*** danfairs has quit IRC15:37
*** agroszer has quit IRC15:40
*** agroszer has joined #zope3-dev15:42
*** lucielejard has joined #zope3-dev15:44
*** menesis has quit IRC15:48
*** aaronv has quit IRC16:02
*** danfairs has joined #zope3-dev16:03
*** jamur2 has joined #zope3-dev16:06
*** chaoflow has quit IRC16:12
*** J1m has joined #zope3-dev16:21
*** regebro has joined #zope3-dev16:30
*** binseer has quit IRC16:31
*** lurkymclurkleton has joined #zope3-dev16:32
*** chaoflow has joined #zope3-dev16:33
*** hazmat has joined #zope3-dev16:34
*** ChanServ sets mode: +o hazmat16:34
*** aaronv has joined #zope3-dev16:37
*** benji has joined #zope3-dev16:38
*** jayaraj has quit IRC16:39
*** reco has joined #zope3-dev16:41
*** MJ has quit IRC16:48
*** menesis has joined #zope3-dev16:49
*** kaeru has quit IRC16:51
*** nyo has quit IRC16:52
*** binbrain__ has joined #zope3-dev16:53
*** binbrain_ has quit IRC16:54
*** menesis has quit IRC16:55
*** sp0cksbeard has joined #zope3-dev17:00
*** menesis has joined #zope3-dev17:02
*** whit has joined #zope3-dev17:17
*** ignas has joined #zope3-dev17:24
*** pelle_ has quit IRC17:26
*** dvschramm has joined #zope3-dev17:32
*** srichter has quit IRC17:37
*** srichter has joined #zope3-dev17:40
*** nathany has joined #zope3-dev17:41
*** basti__ has quit IRC17:48
*** mcdonc has quit IRC17:52
*** binbrain__ has quit IRC17:56
*** mcdonc has joined #zope3-dev18:02
*** iham has quit IRC18:03
*** Aiste has quit IRC18:06
*** mgedmin has joined #zope3-dev18:11
*** srichter has quit IRC18:19
sparcdafd___: I've got my site working nicely so far, I've created a PrinciplePlugin which builds my principles based on content on the site18:19
*** srichter has joined #zope3-dev18:20
sparcdafd___: and my localroles :-)18:20
sparcdafd___: now I need to turn my people folders into groups18:20
*** reco has quit IRC18:22
*** binbrain__ has joined #zope3-dev18:24
*** reco has joined #zope3-dev18:28
*** davisagli has joined #zope3-dev18:30
*** afd___ has quit IRC18:31
*** projekt01 has quit IRC18:34
*** nathany has quit IRC18:37
*** afd___ has joined #zope3-dev18:37
*** dbfrombrc has joined #zope3-dev18:40
*** nathany has joined #zope3-dev18:42
*** strichter has joined #zope3-dev18:42
*** srichter has quit IRC18:43
*** strichter is now known as srichter18:43
*** ChanServ sets mode: +o srichter18:43
*** agroszer_ has joined #zope3-dev18:44
*** pcardune has joined #zope3-dev18:45
*** agroszer has quit IRC18:45
*** malthe is now known as malthe|away18:50
*** JaRoel|4_ has quit IRC18:51
*** pcardune_ has joined #zope3-dev18:53
*** pcardune has quit IRC18:53
*** pcardune_ has quit IRC18:53
*** ignas has quit IRC18:54
*** davisagli has left #zope3-dev18:54
*** Rolando has quit IRC18:56
*** __mac__ has quit IRC18:58
*** aaronv has quit IRC18:58
*** MrTopf has quit IRC18:58
*** pcardune has joined #zope3-dev19:01
*** J1m_ has joined #zope3-dev19:02
*** binbrain__ has quit IRC19:02
*** rmarianski has joined #zope3-dev19:03
*** J1m has quit IRC19:09
*** aaronv has joined #zope3-dev19:11
*** jukart has quit IRC19:11
*** vimes656 has joined #zope3-dev19:14
*** nyo has joined #zope3-dev19:15
*** afd_ has joined #zope3-dev19:18
*** pyqwer has quit IRC19:26
*** mkerrin has quit IRC19:26
*** davisagli has joined #zope3-dev19:27
*** harobed_ has quit IRC19:30
*** afd___ has quit IRC19:33
*** JaRoel|4D has joined #zope3-dev19:37
*** hazmat has quit IRC19:41
*** thetet has left #zope3-dev19:42
sparcdwhen I'm inside a content item that is Contained and a Container, when I add an item it gives me a input box on the contents instead of a full form to fill out19:45
sparcdI have a namechooser adapter set up for the content type, but that only kicks in *after* the resulting form19:46
*** dunny has joined #zope3-dev19:48
sparcdfixed it, needed to implement IContainerNamesContainer19:51
*** pcardune has quit IRC19:52
sparcdis there a way of searching for all objects that implement an interface?20:04
*** Theuni has quit IRC20:06
*** toutpt has quit IRC20:07
mgedminsparcd: yes and no, but mostly no20:08
*** ignas has joined #zope3-dev20:08
mgedminthere's findObjectsProviding, that only descends through containers20:08
mgedminthere are ZODB object iterators that iterate over all objects20:08
mgedmin(predictably costing you gigabytes of ram and minutes of wall-clock time, if you've databases of nontrivial size)20:08
mgedminso, short answer: no20:09
mgedminyou don't want to do that, unless you really need to do that20:09
sparcdmgedmin: would it be best for me to index IContentType, with a attribute "object_type" ?20:09
sparcdin the catalog20:09
mgedminI think so20:09
*** danfairs has quit IRC20:09
mgedminalthough I have to admit I don't understand what problem you're solving20:09
mgedminbut your suggestion included the magical words "index" and "catalog", which usually point in the right direction20:10
ignassparcd: may I ask you why do you want to do that?20:10
sparcdI would like to search for content on the site and order it by an idex20:10
ignassearch for content?20:10
ignaswhat is "content" ?20:10
sparcdignas: a content type20:11
ignasand your users know what is IConentType?20:11
ignasand what to search for them?20:11
sparcdno, I want the system to show all the content that matches some values20:12
sparcdthe users won't be 'searching'20:12
ignasso you don't want to search for content20:12
ignasyou just want to index some fields20:12
ignasso - do all your content objects have some predefined field that you want a full text index for?20:12
sparcdignas: no, but they soon can have20:13
*** tarek has quit IRC20:13
ignasand if you are not going to "query" for "give all the IPerson objects that have "Foo" in their name"20:13
sparcdthat's why I'm asking what the best way is20:13
ignasthen why record the "Person" bit?20:13
ignasyour users don't care what type the object is of20:13
sparcdignas: what happens if you want a list of Clients that are 'Active'20:13
sparcdand the users aren't 'searching' this is a listing page20:14
ignaslisting - yes, but still, you are setting the filtering parameters20:14
ignasin some way20:14
sparcdyes, hence why I want Clients that are Active20:14
ignashow many clients do you have anyway?20:14
sparcdignas: there could be a few or lots20:15
ignaslots is - 4000 ?20:15
sparcdignas: I have no idea, I'm building a system and don't want to put a finite limit on it20:15
sparcdso it could be 3200020:15
ignasso you want to build it to scale20:15
sparcdignas: yes20:15
ignasas in - overcomplicate your system up front20:15
ignaswell - if you want it  ;)20:16
ignasa ValueIndex for IClient indexing "active" attribute is enough20:16
ignasto allow you to "easily" query all the active clients20:16
sparcdignas: well not necessarily overcomplicate it, just a hint in the right direction20:16
ignashint in the right direction is20:16
ignasDo not use catalog until it starts becoming slow20:16
ignasPremature optimization is the root of all evil!20:17
ignasand Catalog is an optimization20:17
ignasunless you want full text searches20:17
sparcdignas: ok then, back to my original question, how do I find all IClients that have = True?20:17
ignasbut "active" is not a full text search20:17
ignaswell your clients are in a container aren't they?20:17
sparcdignas: they could be in several places, but yes20:18
ignasor are they in multiple different containers?20:18
ignasyou either know where your data is, or you don't...20:18
sparcdwell there are two containers people can add Clients to20:19
ignasso - look for active clients in one, then look in the other20:19
mgedminall_active_clients = [client for container in [container1, container2] for client in container.values() if]20:20
sparcdI'm not going to hard code folder ids20:20
mgedmingood! :)20:20
ignasthen add a layer of indirection20:20
ignaslike an adapter or a utility that returns all the containers20:20
ignasand hardcode the ids in it at the moment20:21
*** nyo has quit IRC20:21
* mgedmin wants to suggest findObjectsProviding again20:21
ignasuntil you will find out what and where you want them and can come up with a better abstraction20:21
* mgedmin waits for ignas's reaction20:21
ignasor yeah - ensure that your clients are in a chain of containers in containers20:21
ignasand use findObjectsProviding20:21
ignasbut still - I think that not knowing where your data is supposed to be20:21
ignasis not a good idea20:21
sparcdignas: how are you supposed to create systems where people can add folders etc if you *have* to call them specific things in specific locations?20:22
ignassparcd: well - it depends on whether you have fixed depth hierarchies20:23
ignasof do you have it more flexible20:23
ignasand only you know if you need it to be "anything anywhere"20:23
*** vimes656 has quit IRC20:24
sparcdthey might decide to call the clients folder 'Customers' etc20:24
ignasand you rarely need that really20:24
ignasyeah, they might, but as long as it is a "ClientsFolder"  you can find it20:24
ignasas long as you know where you can add IClientsFolder objects into20:24
sparcdignas: this is what I'm trying to get at20:24
ignasyou know where to find all of them20:24
sparcdI need to know how to find that20:24
ignasit depends20:25
ignasfor instance in schooltool to find all ISectionContainers i just have to iterate through every term in every schoolyear and get all the section containers in the term20:25
ignasbut names are not important, interfaces are20:25
sparcdignas: but how do you find ISectionContainers (this is what I really want to find out)20:26
sparcd"sparcd: is there a way of searching for all objects that implement an interface?"20:26
sparcdreplace searching for locating, finding etc20:26
ignasif you know where they are - you know it20:26
ignasif it is so flexible you have no idea20:26
ignasyou must iterate through all objects in ZODB to be sure20:26
ignasthe more constraints you add the easier it is20:26
ignascontraint 1 - it will be containers in containers20:27
ignasallows you to use findObjectsProviding20:27
sparcdwell the clients folder will always be in the root of the site20:27
sparcdeven if there are 5 of them20:27
*** vimes656 has joined #zope3-dev20:27
ignasthen just do: [ccontainer for obj in root.values() if IClientContainer.providedBy(obj)]20:28
ignasand that's it20:28
mgedminjust make sure to do it at most once20:28
*** vimes656 has quit IRC20:28
mgedmini.e. in a single function (or adapter), so you can replace it in the future if you find out you need something else20:28
sparcdignas: do I then have to do a security check on each to see if the user can view it?20:28
ignasyeah, like "find all the sites" first20:28
ignaswell yeah, or you will get an error accessing attributes/clients20:29
*** timte has joined #zope3-dev20:30
sparcdok, so I find all of the ClientFolders (check to see if the user can access it) then loop over each of the contents (and check the user can access it)20:30
ignaswell if you have per client and per folder permissions20:30
*** tarek has joined #zope3-dev20:30
ignasthen yeah, that's the only way to be sure20:30
sparcdif a member of one team logs in, they shouldn't be able to see clients of another team etc20:31
ignaswell - if you know who logged in20:31
ignasand one team can never see other team resources20:32
ignasthen WHY search for ALL clients20:32
ignaswhy not list the clients for that team only?20:32
sparcdignas: I was using that as an example20:34
ignasif you want to have per client object access control - you will have to pay the performance costs associated with it20:35
sparcdignas: I'm *very* new to Zope 3, after coming from Zope 2 and Plone20:35
ignasit's not Zope3 specific, it's common sense ;)20:35
sparcdignas: how do I know that the client is owned by that team?20:36
ignasimplementation detail20:36
*** jukart has joined #zope3-dev20:36
ignasit's your application - it's you who can answer these questions20:37
*** benji has quit IRC20:37
sparcdignas: yes I know20:37
mcdoncer.  allowed index?20:37
ignaspermissions in an index20:37
sparcdbut I don't know where to start when it comes to "why not list the clients for that team"20:37
ignasstill fall under "premature optimization" imho20:38
sparcdI have a need, for example, so that when a client logs in they only see the projects they are working on and *cannot* view or edit any others20:38
sparcdso I will have to think how to do this20:38
ignasit all depends on your data architecture really20:39
ignasyou either add everything to top level containers20:39
mcdoncthe first requirement is probably fine to use a catalog query for; the second is just permissions i think20:39
ignasand relate them through attributes20:39
ignasbut you can also do nested containers20:39
ignasbased on ownership20:39
ignasor you can use zc.relationships for relationship between objects20:39
ignasor you can use catalog20:40
ignasor whatever you want20:40
sparcdignas: how do I then control permissions on this?20:40
*** iham has joined #zope3-dev20:41
ignaswell - you can either "use a custom security policy" "use subscribers to set local grants"20:41
*** tarek has quit IRC20:42
ignasor set local grants on root objects20:42
ignasas local grants are inherited from containment parents20:42
*** philiKON has joined #zope3-dev20:44
mcdoncyo philiKON hows the application20:45
philiKONhey mcdonc20:45
philiKONsent it off last week20:45
philiKONthe other one this week20:45
philiKONnow i'll have to wait until they get back to me20:45
mcdoncyou're gonna be separating those protons soon, then20:45
philiKONhaha. no, not me20:46
philiKONthe LHC guys do that20:46
philiKONi'm a theorist20:46
philiKONi'll be separating pencils20:46
mcdoncheh... find that higgs20:46
*** iham_ has joined #zope3-dev20:47
philiKONstoopid higgs20:47
mcdoncfucking thing20:47
davisagliphiliKON: I've always thought theoretical physics and debugging didn't feel too different20:48
philiKONyeah. my calculations are pretty much like my code. i always end up chasing some stupid sign error20:48
ignasdavisagli: they are different, when debugging you always find the bug20:48
ignasnot so much in physics ;)20:48
davisagliignas: always? ;)20:49
davisagliphiliKON: all about making something work within constraints that are beyond your control :)20:50
*** fairwinds has quit IRC20:51
*** sparcd has left #zope3-dev20:51
*** ignas has quit IRC20:54
*** fairwinds has joined #zope3-dev20:55
*** mgedmin has quit IRC20:55
*** TresEquis has joined #zope3-dev20:56
*** danfairs has joined #zope3-dev21:02
*** iham_ has quit IRC21:03
*** tarek has joined #zope3-dev21:04
*** iham has quit IRC21:04
*** Rolando has joined #zope3-dev21:05
*** pcardune has joined #zope3-dev21:06
*** aaronv has quit IRC21:09
*** iham has joined #zope3-dev21:12
*** quodt has quit IRC21:17
*** iham is now known as iham|away21:28
*** afd_ has quit IRC21:33
*** alga has joined #zope3-dev21:36
*** junkafarian has quit IRC21:36
*** yota has joined #zope3-dev21:37
*** agroszer has joined #zope3-dev21:39
*** tarek_ has joined #zope3-dev21:40
*** tarek has quit IRC21:41
*** benji has joined #zope3-dev21:43
*** malthe|away is now known as malthe21:46
*** menesis has quit IRC21:49
*** menesis has joined #zope3-dev21:49
*** menesis has quit IRC21:51
*** agroszer_ has quit IRC21:54
*** danfairs has quit IRC21:55
*** dunny has quit IRC22:00
*** MJ has joined #zope3-dev22:05
*** jukart has quit IRC22:11
*** quodt has joined #zope3-dev22:12
*** nyo has joined #zope3-dev22:13
*** MJ has quit IRC22:19
*** agroszer has quit IRC22:20
*** agroszer has joined #zope3-dev22:20
*** reco has quit IRC22:20
*** reco has joined #zope3-dev22:23
*** whit is now known as whit|banos22:39
*** greenman has joined #zope3-dev22:45
*** nyo has quit IRC22:58
*** nyo1 has joined #zope3-dev22:58
*** nyo1 is now known as nyo22:58
*** menesis has joined #zope3-dev22:59
*** menesis has quit IRC23:00
*** aaronv has joined #zope3-dev23:17
*** Theuni has joined #zope3-dev23:23
*** agroszer has quit IRC23:23
*** Rolando_ has joined #zope3-dev23:23
*** Theuni has quit IRC23:23
*** nyo has quit IRC23:30
*** nyo has joined #zope3-dev23:31
*** sm has joined #zope3-dev23:42
*** Rolando has quit IRC23:42
*** J1m_ has quit IRC23:46
*** Rolando_ has quit IRC23:47
*** Rolando has joined #zope3-dev23:47
*** J1m_ has joined #zope3-dev23:47
*** brandon_rhodes has quit IRC23:52
*** romanofski has joined #zope3-dev23:53
*** nyo has quit IRC23:55
*** redir_ has joined #zope3-dev23:55
*** whit|banos is now known as whit23:58

Generated by 2.15.1 by Marius Gedminas - find it at!