/srv/irclogs.ubuntu.com/2011/11/13/#ubuntu-website.txt

mhall119Ronnie: that's also way too many queries for a single page :(00:33
Ronniemhall119: it indeed is00:33
mhall119definitely sounds like we need a select_related somewhere00:33
Ronnieselect_related does not help with O2M relations like teamevent->teams00:34
Ronniei got it reduced to 2000 queries. but thats still a lot00:34
mhall119true, but sometimes you can reverse how you're doing the query to make it work00:34
Ronnie mhall119, yes i did that on the venue list page, which reduced 800 to 10 queries00:35
mhall119\o/00:35
Ronniebut i see no option here00:35
mhall119aw :(00:35
Ronnieonly this command: https://docs.djangoproject.com/en/dev/ref/models/querysets/#prefetch-related00:35
mhall119Ronnie: where are you looking?00:35
Ronniebut thats only available in the dev (1.4) version00:36
Ronniemhall119: http://localhost:8000/meetings/history/00:36
mhall119Ronnie: are the queries coming from the history_meetings() on the model manager, or from something in the template/00:38
Ronniethe template has a teamevent.teams.all, that means that for each teamevent it should get the teams from the db. also the starttime, which is depended of the first team timezone setting or linked venue (that is shown 4 times per teamevent entry)00:38
mhall119?00:38
mhall119ah, there we go00:38
Ronnieposted the wrong link. this is the corrent one: http://localhost:8000/events/history/00:39
mhall119and a select_related on line 72 of meetings/models.py won't help us here?00:40
Ronniemhall119: what would you select als related ?00:42
mhall119the 'teams' field from TeamMeeting00:42
Ronnieselect_related does not select O2Many relations. only O2O and ForeinKeys00:43
mhall119oh right, it's a M2M00:45
Ronniethats the whole problem. and the teamevent.teams is called several times per teamevent00:45
mhall119right, which sucks because it's almost always going to be only one Team00:46
Ronniei got it down to 1817 queries00:52
Ronniesomehow we should limit per team or month basis00:53
Ronniemhall119: whats the point of having a page with all the past meetings ?00:53
svwilliamsthis is all so similar to stuff I use every day for work and yet so different01:20
svwilliamsanyone have a good suggestion for a python/dijango tutorial?01:20
svwilliamsmaybe a walk through that you build something?01:21
mhall119svwilliams: the django website had a good 4-part tutorial01:43
mhall119svwilliams: https://docs.djangoproject.com/en/1.3/intro/tutorial01/01:44
mhall119Ronnie: I don't recall what the reason was, I think so that people could see what was done in the last month, etc, for UWN01:45
mhall119I think limiting it to a month at a time is reasonable though01:46
svwilliamsI saw that mhall119 but I thought I'd ask, always good to get peoples opinions who have used the tutorials01:48
svwilliamsI'll give it a try01:48
mhall119svwilliams: that's how I learned01:50
nigelbThat's how I learned as well.02:03
nigelbIts interesting that I've never worked on a django project at the start02:03
nigelbI've always come in between and did lots of stuff02:03
doctormo-othernigelb: I tried to make a website, although to be fair I came to django because it contained the majority of the functionality I put into PCWE back in 200202:24
doctormo-otherIt has frustrated me no end to have fairly poorly structured templating engines compared to the perl library I have. I mean django only just in 2011 got conditional element parsing.02:25
nigelbdoctormo-other: heh, personally, I like jinja2 compared to django's templating engine.02:28
doctormo-otherYeah, nigelb I also sit on a hoard of other code that other projects will never really take advantage of.02:30
doctormo-otherBut learning code seems a lot more about popularity than technical ability these days.02:30
* nigelb heads out02:34
knomeis there a way to get a table with all cell borders in the ubuntu wiki?10:32
doctormo-otherknome: Yes, see the table/cell style guide for moin wiki11:29
knomedoctormo-other, i looked at that, but if you want all borders, you have to set those for every cell.11:30
doctormo-otherYes, and now you know why people write websites in html ;-)11:30
knomeyeah well11:35
knomehttps://bugs.launchpad.net/ubuntu-website/+bug/88977611:35
ubot4Launchpad bug 889776 in ubuntu-website "Enable a CSS class for tables for better readability (affects: 2) (heat: 10)" [Undecided,New]11:35
knomeif one could have a css class in the stylesheet, and just apply that for a table that needs borders...11:35
knomeit would be *much* less work.11:35
knomeimo that should be the default, but even something i have to manually set would be better than editing per-cell11:36
doctormo-otherknome: You could, but it would mean editing the moinmoin and getting Canonical IS to redeploy it. Impossible!11:43
knomei know.11:44
knomebut i've been bugging them too much already.11:44
knomei will not make their lives easy.11:44
knomei've been telling in my blog they are waayyyy suboptimal11:45
knomei will bug them eternally.11:45
cjohnstonis there a way to figure out what is using a certain port12:33
nigelbyup12:41
cjohnstonnm12:42
cjohnstondaker: i replied again16:48
cjohnstonmhall119: do you have the lp>u.c sso script?19:38
mhall119cjohnston: https://pastebin.canonical.com/55702/21:03
mhall119cjohnston: you can also reference https://wiki.canonical.com/InformationInfrastructure/ISD/Docs/SSO/MigratingFromLaunchpadLogin in the email to IS21:04
knomewhat's the status of team reporting? is that dead?23:15

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!