[00:02] JoseeAntonioR: So, how can I help you? :) [00:02] bilal: I'm still struggling with this thing. when I embed the separate file, it didn't work [00:03] JoseeAntonioR: You had the reverse match exception right? [00:03] that's still the problem? [00:03] yeah [00:03] yep [00:03] are you including the URL file [00:03] ? [00:03] what do you mean by the url file? [00:03] the file where you define new URLs [00:03] and you link views to it [00:03] hmm, not sure, I just edited the code [00:04] okay [00:04] so you probably did not add any new views [00:04] erm [00:04] :P [00:04] brb, dad's calling [00:04] open up the urls.py file, it should be in one of the directories [00:04] okay, no problem, ping when you're back [00:12] bilal: back [00:12] So yes [00:12] open the urls.py file [00:12] mhm [00:12] it must be in some directory within the project [00:13] and look for the view which you're finding a url for [00:13] check if it's listed [00:13] and also [00:14] {% url app.view.view_name_here arg1 arg2 %} is the format, not {% url 'app.view.view_name_here' arg1 arg2 %} [00:14] I learnt it the hard way yesterday [00:14] bilal: you mean, the URL i'm calling? that was already listed as per other features [00:15] yup [00:15] yeah, that's been listed forever [00:15] check the format then [00:15] can you do a pastbin of that code block again? [00:15] just of the script? or including the img tag? [00:16] both preferably [00:17] http://pastebin.com/atGr2ivX [00:17] line 4 is the img tag that matters [00:19] are you sure it's summit.schedule.views.* and not schedule.views.* [00:20] yep, I copied that from aboce [00:20] above* [00:20] that was listed as an href doing what is doing now in summit.u.com [00:21] what's the exact error message? [00:21] O dpm [00:21] *I don't see a problem with it, it should work [00:23] bilal: http://summit.joseeantonior.com:8000/uds-r/2012-10-29/ has got it [00:24] JoseeAntonioR: remove the comma between the two arguments [00:24] and see if it works [00:24] let's check [00:25] nope [00:25] bilal: but the weird thing it's having troubles with the decorators, and not the views I'm calling [00:26] yeah [00:26] which version of django is it? [00:26] 1.4? [00:26] no idea, /me checks [00:28] bilal: 1.3.1 [00:29] should work then [00:29] weird [00:29] which decorators are you using for the view that's calling the render_to_response? [00:30] or render, whatever [00:30] no idea, cjohnston made that part [00:32] do you have your code in a branch? [00:32] I'll test it myself when I have time [00:32] my code, you mean, the modified one? [00:34] yup [00:34] let me push it [00:37] bilal: https://code.launchpad.net/~joseeantonior/+junk/summit-tests [00:37] thanks [00:37] thanks to you [00:38] oops [00:38] wait, you didn't commit anything [00:38] :) [00:38] yeah [00:40] done [00:45] JoseeAntonioR: Try removing the quotes around the {% url %} tag [00:45] hmm, let's check... [00:45] * bilal made that change, but is too lazy to disrupt his django setup by installing the whole summit project [00:47] nope [00:47] no fix [00:49] meh, still don't know the fix [00:49] I'll work on it tonight then see how it foes [00:49] *goes [00:50] ok, thanks! [00:50] right now I have to finish homework _fast_ [00:50] :P [06:50] bilal: Even devs get homework :p [23:04] JoseeAntonioR: fixed [23:04] it was very simple [23:04] JoseeAntonioR: this is how I did it: http://pastebin.com/fpzDLeeu [23:04] lemme check [23:05] wait, I forgot to enclose the {% url %} tag with quotes [23:05] which I guess is needed here [23:05] so add that, it should still work [23:05] JoseeAntonioR: ^ [23:05] yep [23:05] testing in a sec [23:06] mh0: :) [23:11] bilal: the star is now clickable, but nothing happens [23:11] See your javascript console [23:11] you have the thing quoted, right? [23:12] it's another issue most probably [23:12] it's quoted [23:12] see the source code from your browser [23:12] and see if the correct URL is being passed in onClick [23:12] oh, and there are two functions with the same name [23:12] make sure the correct one is being called [23:15] what do you mean bu there are two functions with the same name? [23:15] there's only one [23:16] bilal: ^ [23:16] two javascript functions [23:16] there are two changeStatus functions [23:17] change the name of one of them [23:17] yeah, each one has a different url in () [23:17] no [23:17] there are two distinct functions with different code [23:17] right at the bottom of the daily.html template [23:18] JS is overriding one with the other [23:18] Who thought that was a good idea? [23:18] oh [23:19] I did Darael [23:19] my bad [23:19] oooh, didn't notice that [23:20] [18:19:49.763] ReferenceError: changeStatus is not defined [23:20] bilal: ^ [23:20] you changed the name of the second one right? [23:21] then change the name in onClick too [23:21] in the img tag [23:21] nah, it's the same [23:21] Also, in the JS function, if data[success]=False: should turn into if data[success]=True: [23:22] oh, and btw, wrong syntax [23:22] it's not Python, so this is the syntax: [23:23] yeah, that False is already a True [23:24] if (data[success]=False) {document.getElementbyId("img_tag_id").setAttribute("src","/media/img/attending.png");} [23:25] and, set an ID for the img tag, preferably img_{{agenda.meeting_id}} or whatever [23:25] and pass it along to the JS function changeStatus too [23:26] since right now you aren't doing anything to the star [23:27] otherwise, it'd change all the non-attendings to attendings? [23:28] right now it doesn't know which IMG tag to modify [23:28] plus, you aren't even putting a new IMG tag out there [23:29] same, changeStatus is not defined [23:29] urgh [23:29] change the name of the function which you wrote in the IMG tag [23:29] onClick="changeStatus(...)" should change [23:29] to what? [23:29] keep the other, smaller changeStatus as-is [23:30] wait, you changed the name of the function, right? [23:30] no [23:30] the function name is changeStatus [23:30] I deleted the other one [23:31] don't delete it [23:31] some other tag in some other template still uses it [23:32] nope, I wrote it [23:32] oh okay [23:32] the point is it still says it [23:32] 's not defined [23:32] also, what is giving the error? [23:32] django, or your browser? [23:33] browser [23:33] ReferenceError: changeStatus is not defined [23:33] check your browser source code [23:33] like, the source code of the page [23:33] see if changeStatus is coming up [23:35] yes, it is [23:35] can you pastebin the source code as shown by your browser? [23:36] bilal: http://pastebin.com/280kP7C5 [23:38] set an id for the img tag, like I said [23:38] [23:39] onclick seems okay [23:39] and in the changeStatus [23:39] make sure you're using the supplied id rather than "img_tag_id" [23:39] though none of this explains the reference issue [23:41] try the error in a different browser [23:42] let me check [23:42] * JoseeAntonioR is super sleepy [23:45] if (data[success]=True) looks...wrong [23:46] -- [23:46] [18:46:04.934] SyntaxError: missing ; before statement [23:46] bilal, tsimpson: any idea on what ^ may indicate? [23:47] ah, that's very helpful [23:47] see, switching browsers helps! [23:47] same browser after a refresh :P [23:47] you're missing a semicolon [23:47] where? [23:47] is the above paste (the diff) what you're running now? [23:48] nope [23:48] give me a sec [23:49] you don't need to do the if statement [23:49] data[success] check isn't neeeded [23:50] tsimpson: http://pastebin.com/sCm0DMdk [23:50] $.post(attend_url, { participation: "ATTENDING" } , function(data){ document.getElementbyId(img_tag_id).setAttribute("src","/media/img/attending.png"); }); [23:50] bilal: what do you mean? isn't it checking if the form went through? [23:50] try that [23:50] ok [23:50] JoseeAntonioR: That function is called ONLY when the post succeeds. See jQuery docs [23:51] bilal: same error, missing ; before statement [23:51] besides "if (data[success]=True) " is wrong [23:51] JoseeAntonioR: you copied and pasted the exact sentence? [23:51] yep [23:51] tsimpson: new code here: http://pastebin.com/s9d7JKZM [23:52] JoseeAntonioR: BTW, you deleted img_tag_id, don't do that [23:53] JoseeAntonioR: keep it in both onClick and send it to the JS function changeStatus [23:53] as well as id="" [23:53] oh, ok ok [23:53] but since you're using it as a variable, don't quote it in JS like you did previously [23:54] ok, not quotes [23:54] quoted* [23:55] http://pastebin.com/gQ29F3Jj new version [23:56] try refreshing [23:57] missing ; before statement [23:57] not sure where [23:58] waaaait a sec [23:59] Not Attending [23:59] bilal: I wasn't closing the onclick tag [23:59] see, it lacks the closing " [23:59] yeah [23:59] JoseeAntonioR: yeah, you got it