/srv/irclogs.ubuntu.com/2015/06/26/#ubuntu-community-team.txt

Silverliono/ and good $daytime to everybody present ;)03:04
dholbachgood morning07:00
dpmmorning dholbach07:01
dholbachhwy dpm07:11
dpmgood good, happy friday07:13
dholbachyes :)07:14
davidcalleMorning all o/07:44
dholbachsalut davidcalle07:46
davidcalledholbach, hey, do you mind having a look at the translations dashboard screenshot on the sprint5 board? It's just a first shot at it, but I'd like to have your feedback.07:48
dholbachsure07:51
dholbachdavidcalle, I noticed you're using connection.cursor()08:04
dholbachdavidcalle, was there no way around it?08:04
dholbachif possible, I'd always use https://docs.djangoproject.com/en/1.8/ref/models/querysets/ as django's usually much better at figuring out which SQL bits to use08:05
davidcalledholbach, I've spent the whole day  on that and haven't found one.08:05
davidcalledholbach, hmm, I'm looking at your link and I'm starting to reconsider...08:08
dholbachdavidcalle, for example:08:09
dholbach>>> from cms import models08:09
dholbach>>> models.CMSPlugin.objects.order_by('changed_date')08:09
dholbach[<CMSPlugin: 27>, <CMSPlugin: 28>, <CMSPlugin: 29>, <CMSPlugin: 30>, <CMSPlugin: 41>, <CMSPlugin: 39>, <CMSPlugin: 43>, <CMSPlugin: 42>, <CMSPlugin: 44>, <CMSPlugin: 45>, <CMSPlugin: 46>, <CMSPlugin: 47>, <CMSPlugin: 49>, <CMSPlugin: 48>, <CMSPlugin: 51>, <CMSPlugin: 50>, <CMSPlugin: 56>, <CMSPlugin: 64>, <CMSPlugin: 67>, <CMSPlugin: 66>, '...(remaining elements truncated)...']08:09
dholbachplaying around with Django's queryset API and other ORM features was one the few revelations in my life08:10
dholbachok, maybe not quite, but still - it's good fun and quite rewarding08:11
dholbachif you want me to have a look at changing it in the code, let me know08:11
davidcalledholbach, well, if you can find queries matching the three I'm doing, please have a go at it :)08:12
dholbachsure08:12
davidcalleHere is the point of each query : the first one looks for recently changed plugins: this provides the date, the lang of the edit, and a "placeholder" id. The second one looks in the plugins revisions history to see if it's an actual manual content change. The third one uses the placeholder id to find which page contains the changed plugin.08:18
dholbachok cool08:19
dholbachit'll take a bit longer as it's not just the queries but also the arguments you pass later on08:19
dholbachbasically instead of an array you can pass use attributes of an object08:19
dholbachwhich will be a bit more readable as well08:20
dholbachI'll let you know when I'm done08:20
davidcalledholbach, awesome. If you find better ways of collating language changes to a page id, please share, I was honestly a bit out of order when I finished that :)08:22
dholbachI'll cycle over to the office real quick then dive back into it08:24
* dholbach hugs davidcalle08:24
dholbachsee you in a bit08:24
dpmwow, dashboard looking good davidcalle!08:24
* davidcalle hugs dholbach back08:24
davidcalledpm, glad you like it :) Daniel is having a look at if it can be simplified, with his djangodb experience from the store data work.08:25
dpmyeah, saw the conversation, good work everyone08:26
davidcalledpm, unrelated but worth knowing, we now have a page to document aggregator scopes : https://developer.ubuntu.com/en/scopes/guides/integration-aggregator-scope08:26
* dpm looks08:27
dpmdavidcalle, I think it might require hitting the "Publish" button :)08:28
Tm_Tnoooooo08:28
Tm_Tit has nice secretive mystery in it this way08:28
dpm:)08:28
davidcalledpm, hey no, that was private documentation! :p08:28
dpmI remember one of my most-visited blog posts was one that I had set to private because I wanted to show the draft to someone, and landed accidentally on Planet Ubuntu as a private post :-)08:29
davidcalledpm, hehe08:30
dpmdavidcalle, do you mind if I add some feedback regarding the dashboard view on the card?08:30
davidcalledpm, sure, it's here for that reason :)08:30
dpmcool08:31
MooDoohello all08:35
dpmhi MooDoo08:42
dpmdavidcalle, done, added some feedback08:43
dpmdavidcalle, on the QML/C++ tutorial card, would you mind adding a link to the tutorial and marking the bug as fix released?08:44
davidcalledpm, yep reading it, and +1 on everything08:44
dpmgreat08:45
davidcalledpm, I haven't marked the bug as released, because I think there is a second requirement (/me looks for it)08:45
dpmdavidcalle, I think he'd need to file a separate bug for that, but neither Pat or I thought it would be something we need to focus on08:45
dpmas it seemed a bit of a corner case08:45
davidcalledpm, ok08:46
dpmI'll add a note myself08:47
czajkowskigooooooood morning08:49
davidcalledpm, I've commented for liuxg to create a second one, and I've marked this one as released.08:49
davidcalleHello czajkowski08:50
dpmdavidcalle, seems we commented at the same time :)08:50
dpmhey czajkowski, happy Friday to you too ;)08:50
davidcalledpm, at least their are not conflicting :)08:50
dpmindeed :)08:51
dpmdavidcalle, also, do you think you could write the brief blog entry as usual, to point folks to the new tutorial?08:51
davidcalledpm, +108:53
dpm\o/08:53
czajkowskiit's Friday it's a good day people!09:05
dholbachdavidcalle, what do you use 'all_pages' for?09:49
davidcalledholbach, leftover cruft09:50
davidcalleafaict :)09:50
dholbachok09:50
dholbachdavidcalle, https://code.launchpad.net/~dholbach/developer-ubuntu-com/translations-dashboard/+merge/26308009:52
davidcalledholbach, lovely, it's much better! Thanks :)09:56
davidcalleMerged09:58
dholbachdavidcalle, the template says /tblody - not sure that was supposed to indicate your thoughts about the project at the time ;-)10:03
dholbachapart from that: +1 from me on the branch10:03
davidcalledholbach, :D10:03
dholbachthe query could probably be a bit faster still10:03
dholbachbut I'm not sure how to do that as I still don't get 100% of the model structure :)10:04
davidcalledholbach, I still want to add a few things, visually, to make the table a bit nicer. Yeah, the model structure is painful, I had to spend a lot of time exploring the db with sqlitebrowser to figure out where the info was.10:05
dholbachgood work!10:07
dholbachmhall119, I'd appreciate another review of https://code.launchpad.net/~dholbach/developer-ubuntu-com/store-data/+merge/26268410:07
dholbachand maybe we can talk about how to make use of the data in a custom plugin or whatever it takes to display it somewhere :)10:08
czajkowskianyone here goig to OSCON, which hotels are you staying at ?10:15
davidcallepopey, works for you? (you need to log in to see the page)11:06
popeydavidcalle: hmm?11:06
davidcallepopey, better with the link https://developer.ubuntu.com/en/community/coreapps/music/11:06
popeyhm, how do i login again?11:08
popeywish there was a handy link11:08
davidcallepopey, /openid/login11:08
popeyi tried variations on that, thanks :)11:08
popeydavidcalle: it says it doesn't exist.11:09
popeynvm, found it via the menu11:09
* popey skips11:10
popey\o/ thanks davidcalle11:10
davidcallepopey, yw :)11:11
balloonshappy friday everyone!11:36
popeyyes11:37
dholbach:)12:02
czajkowskipopey: please kick the server :)12:39
popeyits busy12:43
czajkowskinice name13:00
czajkowskifor the episode13:00
popeyheh13:09
dholbachhey mhall11913:57
dholbachmhall119, how's life?13:57
mhall119hey dholbach13:57
mhall119dholbach: it gives and it takes13:57
* dholbach hugs mhall11913:57
mhall119new washer and dryer are being delivered today,so I get to do laundry agian13:58
dholbachmhall119, can you maybe take a bit of time and explain to me a bit more about the importer and the api site?13:58
dholbachit's a bit hard for me to review your MP otherwise :)13:58
mhall119dholbach: ah, yes, you want to do it on a hangout?13:58
dholbachand I'd also need some help to figure out what the next steps with https://code.launchpad.net/~dholbach/developer-ubuntu-com/store-data/+merge/262684 are13:58
dholbachright now it's just "get data"13:58
dholbachsure13:58
dholbachmhall119, one thing I haven't quite figured out as well is "CSRF verification failed. Request aborted."14:34
dholbachmhall119, after having set up everything according to the README file and navigating to /admin that's what I get14:35
mhall119dholbach: you shouldn't need to go to /admin/14:37
mhall119dholbach: go to /openid/login and then you'll have the djangocms admin bar at the top14:38
dholbachoooooooooooh ok14:38
dholbachthanks14:39
dholbachmhall119, I get http://pastebin.ubuntu.com/11778950/14:50
dholbach(running update_apidocs.sh)14:51
mhall119dholbach: did you activate your virtualenv?14:51
mhall119source ./env/bin/activate14:51
mhall119otherwise update_apidocs.sh uses your system python, rather than the one in the virtualenv14:52
dholbachsorry, yes - that fixes it14:52
dholbachI think I did something wrong wrt putting language/topic/version into the admin interface14:53
dholbachthe data structure and what it's supposed to mean isn't quite clear to me and it looks like the structure is somewhat recursive(?) (topic → version → language → version, etc.)14:55
dholbachlet me go back and try again14:55
mhall119dholbach: just topic -> language -> version14:56
mhall119language has two version fields to store current and development aliases only14:57
mhall119they aren't strictly necessary for doing the import though14:57
dholbachok14:58
dholbachmhall119, if I get "api_docs.models.DoesNotExist: Topic matching query does not exist." I got something wrong, right? :)14:59
mhall119dholbach: it means your database doesn't have  Topic instance that matched the -t flag you've passed to the importer15:01
mhall119dholbach: are you running all of update_apidocs.sh or just one specific import?15:01
dholbachah ok, I didn't know I could limit it15:02
mhall119dholbach: you can pull out just the 2 or 3 lines for the specifc doc you want15:02
mhall119and update_apidocs.sh actually does have comments :)15:03
dholbachok cool15:04
davidcallemhall119, quick django question, how can I make sure AllPages() is instanced each time the page is reloaded? http://bazaar.launchpad.net/~davidc3/developer-ubuntu-com/translations-dashboard/view/head:/translations_dashboard/views.py15:08
dholbachdavidcalle, maybe something like this?15:11
dholbachfrom django.views.decorators.cache import never_cache15:11
dholbach@never_cache15:11
dholbachdef myview(request):15:11
meetingologydholbach: Error: "never_cache" is not a valid command.15:11
dholbachthanks meetingology15:12
dholbachmhall119, does http://127.0.0.1:8000/en/api/autopilot/python/1.5.0/porting-porting/ show up in your case? it's mentioned as "Porting Autopilot Tests" on http://127.0.0.1:8000/api/autopilot/python/1.5.0/15:13
dholbachor is that taken care of by import_sphinx?15:14
mhall119dholbach: it should not have /en/ in there15:16
mhall119it shows up in production: https://developer.ubuntu.com/api/autopilot/python/1.5.0/porting-porting/15:17
mhall119davidcalle: is your concern with cache?15:18
dholbachmhall119, it autoredirects me there15:20
davidcallemhall119, I'm not sure it is, but the functions used from that class never run after the first page load, until the server is restarted.15:20
davidcalledholbach, no luck with never_cache15:20
dholbachdavidcalle, ok - sorry... it was just something I picked up on the net :/15:20
dholbachmhall119, I just used the 3 added lines from update_apidocs.sh this time15:21
mhall119dholbach: it would do that if it has a 404, which likely means that the porting-porting page wasn't imported15:21
dholbachmhall119, not sure if I need to do anything else to import the guides15:21
mhall119dholbach: what importer commands have you run?15:21
dholbachjust the three added lines from update_apidocs.sh15:22
mhall119davidcalle: where is the function located?15:22
mhall119dholbach: ah, then it's only imported the scope-harness docs, which isn't where porting-porting comes from15:23
dholbachok - I don't know how to import that then15:24
davidcallemhall119, everything is in views.py, functions are outside my main class (but could be in)15:24
dholbachmhall119, trying to run import_sphinx, I get http://pastebin.ubuntu.com/11779066/15:25
dholbachis there another thing I should register somewhere?15:26
mhall119davidcalle: if it's in your view, then it should be executed every time unless the page is served from cache15:29
balloonsping jose15:30
mhall119dholbach: you have to give import_sphinx all those various command-line options for it to work15:30
mhall119dholbach: it's not smart enough to print out a help message or anything when they're missing15:30
dholbachhum15:31
dholbachok15:31
dholbachok, then I don't quite know how to drive it15:33
dholbachI guess it should be something like this? python ./manage.py import_sphinx -s autopilot -r 1.5.0 -t autopilot -l pytho15:33
dholbachpython15:34
mhall119dholbach: you can just copy/paste all of the Autopilot section from update_apidocs.sh15:34
mhall119so, line 85-9515:34
mhall119that should all "just work"15:35
davidcallemhall119, working now -_-"15:35
davidcallemhall119, I've turned the class into a function returning what I want and added the never_cache decorator15:38
dholbachmhall119, great, now it works15:41
dholbachthanks15:41
mhall119dholbach: no problem15:41
dholbachmhall119, approved15:53
dholbachall rightie...... have a great rest of your day everyone and a great weekend!15:55
dholbachhugs!15:55
mhall119dholbach: thanks :)15:57
czajkowskidholbach: bye16:00
dholbachbye :)16:02
davidcalleEnjoy your weekend everyone =) o/16:10
=== dpm is now known as dpm-afk
=== dpm-afk is now known as dpm

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