text
stringlengths
15
499
[13:57] <leonardr> the way you get an xhtml representation is to specify 'accept', as you did
[13:58] <deryck> leonardr, PATCHplugin is in lib/canonical/launchpad/javascript/client/client.js and comment says: * This plugin overrides the widget _saveData method to update the * underlying model object using a PATCH call.
[13:59] <leonardr> oh, ok. so it's a way of making the web service the destination of widget actions
[14:00] <deryck> leonardr, right. So this looks like the right path I'm headed down then?
[14:00] <leonardr> deryck, yes, it looks like it
[14:00] <deryck> leonardr, excellent. thanks for the help!
[14:01] <leonardr> np
=== abentley1 is now known as abentley
[14:10] <gmb> deryck: Ah! That's... annoying but useful. Thanks.
[14:16] <deryck> gmb, yeah, you would think it could blow away previous defaults or somehow be backwards compatible.
=== mrevell-lunch is now known as mrevell
[14:31] <sinzui> bac, Edwin, salgado: standup in 2 minutes
[14:34] <intellectronica> leonardr: i'm having an interesting problem using the webservice. it seems it can't mix between api.launchpad.net/beta and launchpad.net/api/beta url. if i post to and using the other in a value it complains
[14:35] <intellectronica> leonardr: i've got a workaround, but i think it would make sense to allow both, no?
[14:35] <leonardr> intellectronica, are you using an ajax client?
[14:35] <intellectronica> leonardr: indeed
[14:36] <intellectronica> oh, of course, domain restrictions!
[14:36] <leonardr> actually, it might not be because of domain restrictions, now that i think about it
[14:36] <intellectronica> still, i'm not trying to access a different domain. i just pass a uri as a value
[14:37] <leonardr> i think the parser assumes incoming urls use the same host as the host of the current request
=== abentley1 is now known as abentley
[14:37] <leonardr> that'd be pretty hard to change; how annoying is this for you?
[14:38] <intellectronica> leonardr: it's annoying in that i have to write code especially to convert the result of canonical_url (which uses the api domain) to the format which uses the /api root. it seems wrong to have that hard coded
[14:38] <intellectronica> as i said, it works now, so i can leave it with an XXX, but i think that it would be good if in the future we handled that
[14:38] <leonardr> intellectronica: i think bjornt has fixed the underlying problem
[14:39] <intellectronica> leonardr: even in the absence of a webservice request?
[14:40] <leonardr> intellectronica: ok, let's back up
[14:40] <leonardr> where are you getting the data that you have to convert?
[14:40] <intellectronica> the problem i have is that i do the formatting in a normal web request
[14:41] <intellectronica> leonardr: while processing a normal browser request, i take an object (from a vocabulary) and i want to get the api url for it, which i will use when issuing a PATCH request from the AJAX client
[14:41] <leonardr> ok, you are writing code in launchpad
[14:41] <leonardr> i thought you were writing client code
[14:41] <intellectronica> yup
[14:42] <intellectronica> leonardr: well, i'm doing both. the client code wants an api url in the same domain as the page
[14:42] <intellectronica> but i'm preparing this value in advance when rendering the page
[14:43] <leonardr> intellectronica, what bjornt did was change canonical_url so that if you did not pass in a request object, it would give you the object's website url, not the web service url
[14:44] <intellectronica> leonardr: right, so that won't solve my problem
[14:44] <leonardr> but that won't help you. you need to get the object's web service url for the web service as accessed through the website
[14:44] <intellectronica> leonardr: what i have to do now is get the website url, parse it, inject '/api/beta' and unparse
=== abentley1 is now known as abentley
[14:45] <intellectronica> leonardr: maybe all i need to do is extract this to a function we can use everywhere. i don't know if it makes sense to overload canonical_url with more stuff
[14:46] <leonardr> intellectronica: in theory there's some request object you could create and pass into canonical_url that would make canonical_url do what you want
[14:46] <leonardr> canonical_url already generates those urls under some circumstances
[14:46] <intellectronica> leonardr: ok, that may be a better way to implement that, but i still don't think i should have to do that every time i need to generate a url
[14:47] <intellectronica> leonardr: also, it seems a bit wrong to create a request object just for that purpose
[14:47] <leonardr> intellectronica, we create request objects all the time for similar purposes
[14:47] <leonardr> changing canonical_url is a huge task
[14:48] <intellectronica> fair enough. do you maybe remember a place where we do that?
[14:48] <intellectronica> leonardr: i agree. i think i'll just create a new helper function, webservice_canonical_url() or something like that
[14:48] <leonardr> intellectronica: check out bjornt's code. you can do the same thing in your helper function, but also check canonical_url to see what the request has to look like for that kind of url to be generated
[14:49] <intellectronica> leonardr: cool, thanks
=== abentley1 is now known as abentley
[14:51] <BjornT> intellectronica: it might work if you simply do: canonical_url(ob, request=IWebServiceClientRequest(request))
[14:51] <BjornT> intellectronica: but hard to say without looking at your code
[14:54] <intellectronica> BjornT: yes, that seems to work just fine. thanks!
[15:11] <gmb> Gah. Did I mention that I hate Javascript?
[15:11] <mars> :)
[15:17] <maxb> Does anyone like Javascript? :-)
[15:31] <kfogel> mrevell: ready to skype?
[15:32] <mrevell> Hi kfogel, almost, just making a cup of tea
[15:33] <kfogel> mrevell: no rush, I'm on skype now
[15:34] <kfogel> mrevell: meaning, available when you're ready, but take your time
[15:35] <gmb> Does anyone have any idea under what circumstances a named_post would just sort of vanish into the ether when called from Javascript? Neither success nor failure callbacks are called.
[15:36] <gmb> Ah, wait.
[15:36] <gmb> If I actually read the output from the server, that would help.
=== Ursinha-afk is now known as Ursinha
[15:53] <rockstar> morning
[15:54] <noodles775_> beuno: It'd be great to be able to find out exactly what the purpose and use-cases of a page is on LP - documenting that info in some permanent location.
[15:54] <noodles775_> beuno: I think mars mentioned something along those lines the other week...
[15:54] <beuno> noodles775_, yes
[15:54] <noodles775_> beuno: but I've created https://dev.launchpad.net/SoyuzBuildersIndexPage
[15:55] <noodles775_> as an example, and will fill it out as I get info, but is there anything you'd add (I'm about to create a second one for another page)
[15:56] <beuno> noodles775_, on calls, but will look at it afer them
[15:56] <noodles775_> beuno: yep, no rush. Thanks.
=== kiko-afk is now known as kiko
[16:36] * rockstar is glad to have 4 cores, since make schema is chewing on an entire core
=== abentley is now known as abentley-lunch
=== salgado is now known as salgado-lunch
=== deryck is now known as deryck[lunch]
=== noodles775_ is now known as noodles775-afk
=== deryck[lunch] is now known as deryck
[17:50] <sinzui> beuno: I would like your opinion of the screencaps for bug 399010.
[17:50] <ubot3> Malone bug 399010 in launchpad-registry "Update simple edit pages to base-layout" [High,In progress] https://launchpad.net/bugs/399010
[17:50] <mup> Bug #399010: Update simple edit pages to base-layout <story-ui-3> <Launchpad Registry:In Progress by sinzui> <https://launchpad.net/bugs/399010>
[17:50] <mup> Bug #399010: Update simple edit pages to base-layout <story-ui-3> <Launchpad Registry:In Progress by sinzui> <https://launchpad.net/bugs/399010>
[17:50] <mup> Bug #399010: Update simple edit pages to base-layout <story-ui-3> <Launchpad Registry:In Progress by sinzui> <https://launchpad.net/bugs/399010>
[17:50] * sinzui now hacks on project page
[17:51] <rockstar> Looks like we need to either kill ubot3 or mup...
[17:53] <gmb> rockstar: Better still, make them fight until one dies.
[17:53] <sinzui> two bots enter, one bot leaves
[17:54] <sinzui> I suspect mup is cheating and may in fact be 3 bots
[18:07] * gmb EODs
=== abentley-lunch is now known as abentley
=== kiko is now known as kiko-fud
[18:12] <beuno> sinzui, finishing lunch, and will look
[18:24] <abentley> rockstar: chat?
[18:25] <rockstar> abentley, sure. One sec.
[18:32] <abentley> rockstar: https://launchpad.canonical.com/DeveloperDocumentation/TemplateCodeReuse
[18:48] <rockstar> abentley, actually, the more I think about it, the more it would seem to follow current conventions if it was a link to a single submit button form value.
[18:48] <rockstar> abentley, although I am not qualified to make UI decisions.