Monday, 2008-10-20

*** tpb has joined #melange00:00
*** Allen is now known as Allen|away\04:03
*** Allen|away\ is now known as Allen|away04:03
*** mithro has quit IRC04:06
*** mithro has joined #melange04:07
*** ChanServ sets mode: +v mithro04:07
*** mithro has quit IRC04:46
*** penyaskito_ has joined #melange06:14
*** penyaskito has quit IRC06:19
*** penyaskito_ is now known as penyaskito06:34
*** Allen|away has left #melange06:56
*** James--Crook has joined #melange11:58
*** James--Crook has left #melange11:58
*** penyaskito has quit IRC12:10
*** mithro has joined #melange12:29
*** ChanServ sets mode: +v mithro12:29
*** SRabbelier has joined #Melange12:34
*** ChanServ sets mode: +v SRabbelier12:34
*** solydzajs has joined #melange12:53
*** ChanServ sets mode: +v solydzajs12:53
solydzajsSRabbelier: ping12:53
*** solydzajs has quit IRC12:54
*** mithro has quit IRC13:00
*** lh has joined #melange13:49
*** ChanServ sets mode: +o lh13:49
*** lh is now known as lh_gsd13:56
SRabbelierlh_gsd: working on getting Host profile done now13:58
lh_gsdSRabbelier: this is good.14:15
SRabbelierlh_gsd: would be good if Pawel was online though :D14:18
SRabbelierlh_gsd: need to bother him about that as_table Django template14:18
lh_gsdSRabbelier: i will see if i can find him. think he is heads down right now.14:19
SRabbelierlh_gsd: ah, ok14:20
*** tlarsen has joined #melange14:21
*** ChanServ sets mode: +o tlarsen14:21
SRabbeliertlarsen: ping14:26
tlarsenSRabbelier: hello14:28
SRabbeliertlarsen: I'm started on the Host profiles14:32
SRabbeliertlarsen: and am I right that they will live in /host/<sponsor>/<link_name>14:32
SRabbelierand ofcourse in /site/host/<sponsor>/<link_name>/14:32
tlarsenSRabbelier: Have you finished your refactoring yet?14:32
tlarsenSRabbelier: I wouldn't start on something new until we've converted some existing views over to the new code.14:33
SRabbeliertlarsen: I addressed all your comments in one of the earlier commits?14:33
SRabbeliertlarsen: oh, Pawel asked me to do this first14:33
SRabbeliercos he really needs it14:33
tlarsenHmmm.  I don't like having two parallel sets of view code in the codebase.14:33
SRabbeliertlarsen: me neither, I admit14:33
tlarsenI am still coding to the old one, because I don't see good examples of how to use the new one.14:33
SRabbeliermhhhh, ok14:34
tlarsenI would like to merge the Page stuff in with the View code, but it is incomplete.14:34
SRabbeliertlarsen: mhhh, lemme see how fast I can refactor docs14:34
tlarsenSRabbelier: I understand that we are trying to encourage code re-use, but it is unclear to me whether each separate view (the way Django defines it, a urlpattern) needs its own class, or if instances of the class are customizable enough that all views that are similar would share the same class (what I think I would prefer)>14:35
SRabbeliertlarsen: the idea is that each entity get it's own subclass14:35
SRabbeliertlarsen: due to the way you prefferred to have the __init__ done14:36
SRabbeliertlarsen: I'd say that all customization should be done through subclasses14:36
tlarsenAh, and then if you have, say, multiple URLs to edit Documents that should have different permission regimes, you create multiple instances?14:36
SRabbelierwhat else would be the point in allowing subclasses to override everything if you don't use that capability14:36
SRabbeliertlarsen: no, the instances are singletons14:36
SRabbeliertlarsen: although...14:37
SRabbeliertlarsen: well, that could work too14:37
SRabbelierbut sounds less nice to me14:37
tlarsenI just want to instantiate a Document editor instance that responds to /docs/edit that is slightly different from the one that responds to /site/docs/edit.14:37
SRabbeliertlarsen: different permission wise, yes?14:37
tlarsenI don't think those need to be different classes, just different instances, with different URL patterns supplied.14:37
SRabbeliertlarsen: mhhh, we can do it with different instances by passing a rights dict to the constructor14:38
tlarsenI just think that there are likely to be views that are so similar, that any differences they have should be covered by initialization parameters, not a whole new subclass.14:38
SRabbeliertlarsen: well, we have the option to do both :)14:38
tlarsenThat is why I want to see some existing views moved over.14:39
SRabbeliertlarsen: ok, I'll do docs first then14:39
tlarsenIt is unclear to me what the usage patterns should look like.14:39
SRabbelierhopefully won't take long14:39
SRabbeliertlarsen: btw, the sub-menu title of "Site Settings        Site Users                  " seems funny14:40
SRabbeliertlarsen: can we go with "Site Settings" -> "Users"14:41
SRabbeliere.g., do s/Site Users/Users/ ?14:41
tlarsenI don't care either way.  I would like it better if we waited until Javascript collapsable sidebar menus before changing that, though.14:41
tlarsenActually, just having breadcrumbs implemented would be enough.14:42
SRabbeliertlarsen: sure thing14:42
tlarsenThe issue is that currently that same sidebar menu text is used as the "header" of the page (where the breadcrumbs are supposed to go.14:42
SRabbeliertlarsen: aaaah, right, ok :)14:42
tlarsenSo, with breadcrumbs, we could change "Site Settings" to just "Site", and the users one to "List Users" or something, and it would be Site > List Users in the header.14:43
SRabbeliertlarsen: question: the package is being phased out right?14:43
tlarsenThat is the purpose behind the breadcrumb stuff, to give you some context for the current page, without repeating (in this example) the word "Site" *everywhere*.  :)14:43
tlarsenI don't know.14:43
SRabbeliertlarsen: I would prefer if it was14:44
tlarsenI was just taking some "Site" views that I thought really didn't differ, other than some permissions checking, that should otherwise be generic.14:44
tlarsenI think we should consider this on a view-by-view basis.14:44
tlarsenLet's not have any preconceived notions yet.14:44
SRabbeliertlarsen: the refactored views I think should all go in soc.views.models.*14:44
SRabbeliertlarsen: yeah, that'd be good14:44
tlarsenI am sure there are going to be some views that are not directly based on Models, so, no, all of them do not belong in that package.14:45
SRabbeliertlarsen: right, I meant all the model based views :)14:45
tlarsenIf you move *everything* into that package, why not just abolish the package and move everything back into soc/views ?14:45
durin42I've got some ideas on how to make tests work, FYI14:45
durin42I have *not* figured out how to emulate the sandbox during testing14:45
SRabbelierdurin42: emulate the sandbox?14:46
durin42make all the special modules not importable14:47
SRabbelierdurin42: 'special modules'? xD14:47
durin42SRabbelier: things like cPickle14:47
durin42don't exist14:47
SRabbelierdurin42: in GAE?14:48
* SRabbelier nods14:48
SRabbelierok, gotcha14:48
*** penyaskito has joined #melange14:48
SRabbeliertlarsen: the module is 1:1 refactorable14:52
tlarsenSRabbelier: OK, I look forward to seeing the patch.  I would like to see it wired into the existing and working, as well.14:57
SRabbeliertlarsen: ofcourse, that's how I test it :)14:58
SRabbeliertlarsen: why is http://localhost:8080/docs/show/foo/bar showing up left aligned for me? :P15:02
SRabbeliererrr, right aligned15:02
SRabbeliertlarsen: (on a clean checkout)15:04
tlarsenNo idea.15:04
tlarsenI'm not the TinyMCE expert.15:04
SRabbeliertlarsen: the TinyMCE stuff shows up fine15:05
SRabbeliertlarsen: it's the non-tinyMCE stuff that looks funny15:05
tlarsenWhat is being right-aligned?15:05
SRabbeliertlarsen: all the other fields15:05
tlarsenIs it some change Pawel made when he added the BaseForm class?15:05
SRabbeliertlarsen: not sure, is it looking ok for you?15:05
tlarsenI haven't sync'd my client lately.15:06
tlarsenI will take a look before and after I sync and see if I notice what you are talking about.15:06
tlarsenI will let you know.15:06
SRabbeliertlarsen: ok, thanks15:06
tlarsenNow, I've got to go eat lunch.  I was out getting my wife's car worked on early this morning, and it took them 3 hours. :(15:07
tlarsenAt least my Prius is up and running again.15:07
tlarsenIt only took me about an hour this weekend to put that 100A fusing block back in.15:07
tlarsen(even though the wires that connect to it were painfully short, and I have the scraped knuckles to prove it)15:07
SRabbeliertlarsen: hehe, my uncle's got a Prius, they're fancy :D15:08
tlarsenUnlocking the secret diagnostic menus is like activating cheats in a video game.15:09
SRabbeliertlarsen: lol, it has a secrit diagnostics menui? :P15:09
SRabbeliertlarsen: heh, sweet, the module was 1:1 refactorable as well15:10
SRabbeliertlarsen: ok, looks like edit and create are refactorable as well15:15
SRabbeliertlarsen: ping?15:39
SRabbelierdurin42: ping?15:42
SRabbelierdurin42: how do you set a form's field after it is created?15:50
SRabbelierdurin42: it seems that doing 'form.created_by = ...' doesn't work15:50
tlarsenSRabbelier: Why are you pinging me?15:51
tlarsenSRabbelier: I'm waiting to see diffs.  :)15:51
SRabbeliertlarsen: same question as I asked during4215:51
SRabbeliertlarsen: it works, wit hthe exception of the 'created_by' field15:52
tlarsenI don't think you can alter created_by.15:52
tlarsenIt is set at first creation of the entity, and then it is frozen, right?15:52
SRabbeliertlarsen: no I mean, code-wise15:52
SRabbeliertlarsen: I'm trying to do this15:52
SRabbelier    form.created_by =
tlarsenOh, oops.15:53
tlarsenUsually you set it with initial={} or instance= when you create the form object, right?15:54
SRabbeliertlarsen: yes, that's how it's done in the code15:54
SRabbeliertlarsen: is there no other way to do it though?15:54
tlarsenWell the fields dict is a dictionary of field objects.15:59
SRabbeliertlarsen: ok, so I could do form.fields['created_by'] ?15:59
tlarsenI'm not sure what object you get from that though.15:59
tlarsenI know that form.fields['foo'].widget gives you the control widget.16:00
SRabbeliertlarsen: heh, lol, when I do that it only shows "  Please use this form to edit the document.  "16:00
SRabbeliertlarsen: instead of the form16:01
SRabbeliertlarsen: (e.g., the entire form dissapears)16:01
tpb<> (at
tlarsenSo, it looks like using the 'initial' dict argument to the Form constructor is the "right" way to set form field initial values.16:02
SRabbeliertlarsen: mhhhh, well, either that, or by using the instance= ...16:02
tlarsenYes, but that expects a Model object.16:04
SRabbeliertlarsen: this works: form.fields['created_by'].initial =
tlarsenWhy are you needing to tweak a form field after initialization?16:04
SRabbeliertlarsen: well, we use this code to init the form: form = self._params['edit_form'](instance=entity)16:05
SRabbelieror, translated: form = EditForm(instance=entity)16:05
SRabbelieranother option would ofcourse be to set the created_by attribute in the entity16:05
SRabbelierbut I thought you said you'd rather not do that16:05
tlarsenIs this an existing entity?16:06
tlarsenIf so, it is already set, right?16:06
SRabbeliertlarsen: mhhh, no, it's not a field in docs16:07
SRabbeliertlarsen: docs only contains a 'author' field16:07
tlarsenauthor == created by16:07
SRabbeliertlarsen: which is not displayed16:07
tlarsenI removed the multiple authors stuff already.16:07
SRabbeliertlarsen: exclude = ['inheritance_line', 'author', 'created', 'modified']16:07
tlarsencreated  is a date/time16:08
SRabbeliertlarsen: from the snipped I pasted: 'created_by :'16:08
tlarsenauthor should be the ReferenceProperty that points to the author.16:08
SRabbeliertlarsen: it is16:08
SRabbeliertlarsen: but it's not displayed, see the exclude thing16:08
tlarsenSo, then what is created_by?16:08
SRabbeliertlarsen: it's the link_name of the author property16:08
SRabbeliertlarsen: that's what it is in the current code anyway16:08
tlarsenOh, that is because it makes no sense to display a User reference in the form.16:09
tlarsenIt is some long thing with an object address and stuff.16:09
SRabbeliertlarsen: right16:09
SRabbeliertlarsen: so, that's why I have to update it after-the-fact16:09
SRabbeliertlarsen: in the _editGet function16:09
SRabbeliertlarsen: you ok with using the .initial field of CharField?16:11
SRabbeliertlarsen: I reckon that's what it should be used for16:11
tlarsenI guess, I don't know.16:18
*** tlarsen is now known as tlarsen|lunch16:18
SRabbeliertlarsen|lunch: what should be returned by 'editPost' when the form is not valid?16:22
tlarsen|lunchIf the form is not valid, an exception is raised, and Django handles it, I believe.16:28
tlarsen|lunchIt redisplays the form with error messages added, preserving the already-typed-in values.16:29
*** tlarsen|lunch is now known as tlarsen16:29
tlarsenSRabbelier: my working copy, both before and after a sync to the latest rev, did not right-align stuff in the /docs/edit form.16:37
SRabbeliertlarsen: ok, that's curious16:38
SRabbeliertlarsen: might be a language setting on my laptop somewhere, who knows16:38
SRabbeliertlarsen: ok, edit document works too now16:48
*** penyaskito has quit IRC16:48
*** penyaskito has joined #melange16:49
*** James--Crook has joined #melange16:49
lh_gsdJames--Crook: ping16:55
lh_gsdJames--Crook: i edited your blog post - can you take a look and make sure you are happy with it?16:56
tpb<> (at
lh_gsdand what user stories need most urgent review?16:56
James--CrookWill do.  Will respond by e-mail.16:56
* lh_gsd took the weekend off16:56
lh_gsdJames--Crook: thanks16:56
* tlarsen is sad that anyone has to "take the weekend off".16:58
lh_gsdtlarsen: welcome to my life16:58
tlarsen(since that implies that the norm is working on the weekend)16:58
lh_gsdit is.16:58
tlarsenI dabble with a little bit of work email in the evenings on weekends, but that is all.16:59
tlarsenI have too many other things to do to work 7 days a week for Google.16:59
tlarsen6.5 days, tops.  :)16:59
SRabbeliertlarsen: heh, your family must love Google *snickers*16:59
* tlarsen just wishes all of those pesky "life" things would quit getting in the way of work...17:00
lh_gsdtlarsen: yes me too.17:00
SRabbelierShouldn't it be the other way around? :P17:00
lh_gsdSRabbelier: you are clearly *not* a workaholic17:01
lh_gsdi am17:01
lh_gsdkeeps me from drinking. :)17:01
* lh_gsd goes to meeting17:01
SRabbelierlh_gsd: -rofl-17:01
SRabbelierlh_gsd: enjoy :P17:01
tlarsenThat reminds me of a t-shirt:  "I am chocoholic, but with alcohol instead of chocolate."17:02
SRabbeliertlarsen: lol, that's bad :P17:03
SRabbeliertlarsen: any idea why I would get this? "Status: 302 FOUND Content-Type: text/html; charset=utf-8 Location: http://localhost:8080/site/sponsor/profile/srabbelier?s=0  "17:24
SRabbeliertlarsen: never mind, figured it out17:26
*** lh_gsd is now known as lh18:01
tlarsenlh: what is "_gsd" ?18:02
lhgetting <choose your option> done18:02
tlarsenAs in <choose your option> == "stuff"?  :)18:03
lhthat is a nice way to tell the kids yes i am here, leave me alone unless you actually need something besides entertainment.18:03
lhkids = socers18:05
tlarsenAh, I didn't think you had any...18:05
lhnot in the literal sense no. in the metaphoric sense, several hundred. beats diapers.18:06
* SRabbelier snickers18:06
SRabbelierdoubtfully kids hanging around on IRC18:06
*** tlarsen_vm has joined #melange18:06
*** ChanServ sets mode: +o tlarsen_vm18:06
tlarsen_vmvm = virtual machine18:07
tlarsen_vmThis is Pidgin running inside my Ubuntu 8.04 image on VMware Workstation 6.5.18:08
SRabbeliertlarsen, tlarsen_vm: when I'm devving my internet sometimes dies, making me wait __very long__ on the google analytics, and the google search box to time out18:08
tlarsen_vmThe "real" tlarsen is, sadly, running Pidgin on a Windows Vista quad-core that runs the vm rather well.18:08
SRabbeliertlarsen, tlarsen_vm: would you object to putting those in {% if not is_debug %} blocks?18:08
tlarsen_vmSRabbelier: that is just crap left over from the mockup.  Feel free to remove it for now.18:09
SRabbeliertlarsen_vm: wooh, ok :)18:09
tlarsen_vmThe vm runs full-screen and hides the IRC client running on the Windows side.18:10
* tlarsen_vm can't wait to move into the *real* house and unpack his Linux boxes.18:10
SRabbeliertlarsen, tlarsen_vm: refactor done I think18:11
SRabbeliertlarsen_vm: heh, do they also have a quad-core specs? :P18:11
tlarsen_vmNo, but a dual-core is fine when Linux is running native and not in a VM under Windoze.18:12
tlarsen_vmMy only two quad-core machines are both Windows (one Vista 32-bit, and one XP 32-bit).18:13
SRabbeliertlarsen_vm: why do you have so many boxes?18:13
tlarsen_vmThe Linux boxes are a variety of dual-proc P3s, a dual-proc Xeon, and dual-core Intel boxes.18:13
tlarsen_vmThe three 1U dual-proc P3 boxes form the triple-redundant file server.18:14
tlarsen_vmThe dual-proc Xeon box has something like 3 TB of disk space RAID-0'd, for storing media.18:14
tlarsen_vmThe others are just toys and left-over laptops and the like.18:14
* SRabbelier snickers18:15
SRabbeliertlarsen_vm: you obviously have too much money to spend :P18:16
tlarsen_vmI didn't buy most of them.18:16
tlarsen_vmMost of them were gifts or the results of dumpster-dives.18:16
tlarsen_vmI used to work in the Google Search Appliance team, and they once threw away some nice stuff.  :)18:17
tlarsen_vmAnd, no, I didn't *steal* any of it.18:17
SRabbeliertlarsen_vm: oh?18:18
* SRabbelier grins18:18
tlarsen_vmThe 1U dual-proc P3s are former Google Mini 1.0 units (that actually never got *manufactured* into Minis).18:19
tlarsen_vmOne of the dual-proc Xeons is a very beat-up Google Search Appliance.  The other I built myself, but got a lot of the parts from my early Google days when I was on the Production team and we were evaluating new datacenter hardware (years ago, not done like that anymore, and no, I won't reveal more).18:20
tlarsen_vmI plan to get rid of about half of my hardware at some point, but not until we move into the big house and I can see what I am going to use where.18:22
tlarsen_vmI am going to switch the house over to Ubuntu except for a couple of the laptops and three Windows gaming machines.18:22
tlarsen_vmBut, we aren't going to be moving into the big house until December or January, most likely.18:23
SRabbeliertlarsen_vm: hehee, sounds like working at Google hasn't been too bad on you :P18:25
SRabbeliertlarsen_vm: what is running on the other hardware then, if not Ubuntu? Windows?18:25
tlarsen_vmWell, I did end up with a lot of crap to move across the country in the summer of 2007.18:25
tlarsen_vmWell, my daughter's Athlon64 X2 is a Windows gaming rig, and her ThinkPad is running Windows also.18:26
tlarsen_vmMy son's gaming rig is a Core 2 Duo running Windows XP 32-bit MCE.18:26
tlarsen_vm(both of my daughter's machines are XP 32-bit)18:27
tlarsen_vmMy wife's (craptacular) laptop is running Windows Vista 32-bit, and it *sucks*.18:27
SRabbeliertlarsen_vm: I mean, you say you're switching to Ubuntu, what's running on the ones you'll be switching?18:27
tlarsen_vmI'm moving all of the "general use" workstations to Ubuntu in the big house, and they will all be some cheap, identical mini-desktop hardware from Dell or HP (whichever one I find out is cheap and runs Ubuntu the best).18:28
SRabbelierget her one of the new mini-laptops? :)18:28
tlarsen_vmI am buying new hardware for the switch to Ubuntu.18:28
SRabbelieraaaah :)18:28
tlarsen_vmI want them to be identical, so that with NFS /home and network log in, anyone can work anywhere, and everything will be backed up.18:28
SRabbeliertlarsen_vm: sounds like you're getting a lot of those workstations?18:28
tlarsen_vm4, I think.18:28
SRabbelierheh, zealous :P18:29
tlarsen_vm3 in the classroom and 1 in the study.18:29
tlarsen_vm(my children are home-schooled)18:29
SRabbelieraaaah, that explains the classroom :P18:29
tlarsen_vmMy wife has a degree in Education and was a classroom teacher for several years.18:30
SRabbeliertlarsen_vm: aah, you're allowed to teach your children if you have a education degree?18:31
tlarsen_vmShe did not start home-schooling until they reached Middle School age (6th grade, age 11).18:31
tlarsen_vmSRabbelier: such a degree is not required, but the rules vary from state to state.18:31
tlarsen_vmSRabbelier: we still partner with a private "cover" school that keeps all of the records, responds to requests for transcripts, and the like.18:31
SRabbeliertlarsen_vm: oh, you don't even need a degree to home-school your kids?18:32
* SRabbelier nods18:32
*** James--Crook has left #melange18:36
SRabbeliertlarsen, tlarsen_vm: I have a bunch of small, tested, commits that together make for using the generic Sponsor and Document views, can I commit them?18:48
SRabbeliertlarsen, tlarsen_vm: did you get my question? (if you replied, I didn't see it, internet is :( here)18:58
tlarsen_vmSRabbelier: I've been AFK.19:15
SRabbeliertlarsen_vm: ok :)19:15
SRabbeliertlarsen, tlarsen_vm: I have a bunch of small, tested, commits that together make for using the generic Sponsor and Document views, can I commit them?19:15
tlarsen_vmSure.  We'll fix what is broken when we find it.  :)19:15
SRabbeliertlarsen, tlarsen_vm: committed19:27
tlarsen_vmI probably won't have time to comment on them tonight.19:31
SRabbeliertlarsen_vm: ok, I'll get started on Host then19:31
*** tlarsen_vm is now known as tlarsen_vm|afk19:49
*** tlarsen is now known as tlarsen|afk19:50
SRabbeliertlarsen|afk, tlarsen_vm|afk: I'll have a look at your comments on the r856 (about the error message) and see if I can improve it19:55
*** tlarsen_vm|afk has quit IRC20:02
*** lh has quit IRC20:15
*** tlarsen|afk has quit IRC20:18
*** tlarsen has joined #melange20:19
*** ChanServ sets mode: +o tlarsen20:19
*** tlarsen has quit IRC20:20
*** tansell has joined #melange20:20
*** tansell has quit IRC21:18
*** tansell has joined #melange21:20
*** tansell has quit IRC22:10
*** _Allen_ has joined #melange22:40
*** lh has joined #melange22:45
*** ChanServ sets mode: +o lh22:45
*** _Allen_ is now known as Allen22:47
lhAllen: how goes?23:09
*** tpb has joined #melange23:19
*** mithro has joined #melange23:27
*** ChanServ sets mode: +v mithro23:27
SRabbelierlh: mhhh, Pawel's as_table work is really nice, but would be even nicer if there was a as_public_table :P23:38
lhSRabbelier: explain what this means23:43
SRabbelierlh: he's made a really cool as_table method23:48
SRabbelierlh: instead of having to manually specify all fields in the Django template23:48
SRabbelierlh: we can just go 'entity | as_table', and voila!23:49
SRabbelierlh: but there's no way to create the 'public' page yet that way23:49
*** Allen is now known as Allen|away23:50
lhSRabbelier: this should be easy to fix. concentrate on your work. :p23:50
SRabbelierlh: I need it to finish my work xD23:50
SRabbelierlh: but you are right, it won't stop me from almost-finishing what I"m doing :)23:50
SRabbelierdurin42, mithro, Allen|away, penyaskito: ping?23:51
*** mithro has quit IRC23:52
SRabbelierany of you guys know how to properly display a db.ReferenceProperty?23:52
*** mithro has joined #melange23:55
*** ChanServ sets mode: +v mithro23:55

Generated by 2.13.1 by Marius Gedminas - find it at!