*** tpb has joined #melange | 00:00 | |
*** madrazr has left #melange | 01:05 | |
*** dmitrig01|afk has joined #melange | 01:21 | |
*** ChanServ sets mode: +v dmitrig01|afk | 01:21 | |
*** madrazr has joined #melange | 01:56 | |
*** penyaskito has quit IRC | 02:00 | |
*** dmitrig01|afk has quit IRC | 02:17 | |
*** madrazr has left #melange | 03:02 | |
*** SRabbelier has joined #melange | 05:13 | |
*** ChanServ sets mode: +v SRabbelier | 05:13 | |
*** solydzajs has joined #melange | 05:45 | |
*** ChanServ sets mode: +o solydzajs | 05:45 | |
*** penyaskito has joined #melange | 07:32 | |
*** solydzajs_ has joined #melange | 07:52 | |
*** solydzajs has quit IRC | 08:09 | |
*** solydzajs_ has quit IRC | 08:19 | |
*** madrazr has joined #melange | 08:33 | |
*** solydzajs has joined #melange | 09:12 | |
*** ChanServ sets mode: +o solydzajs | 09:12 | |
*** madrazr is now known as madhusudancs | 09:12 | |
*** madhusudancs is now known as madrazr | 09:18 | |
*** Lennie has joined #melange | 09:54 | |
*** ChanServ sets mode: +v Lennie | 09:54 | |
*** mwilkes|away is now known as MatthewWilkes | 10:01 | |
madrazr | Lennie: was just waiting for you to tell that your code breaks too :P r1740 | 10:23 |
---|---|---|
madrazr | but unfortunately its fixed now :D | 10:24 |
*** Merio has joined #melange | 10:55 | |
solydzajs | Merio: I just committed Google Maps integration, I had to change some things and fix your code | 11:13 |
Merio | solydzajs: what was wrong with it? Just for info for better coding :) | 11:21 |
solydzajs | go see the commit | 11:21 |
solydzajs | there was some not defined variable used | 11:21 |
solydzajs | and some other stuff | 11:21 |
Merio | Ok, will go :) | 11:22 |
*** N4L|Lennie has joined #melange | 11:25 | |
*** Lennie has quit IRC | 11:26 | |
N4L|Lennie | hehe | 11:27 |
N4L|Lennie | I broke it madrazr ^^ | 11:27 |
*** N4L|Lennie is now known as Lennie | 11:27 | |
*** ChanServ sets mode: +v Lennie | 11:27 | |
Lennie | Merio | 11:28 |
Lennie | wazzup | 11:28 |
Merio | Lennie: hi :) | 11:33 |
Lennie | hiya :) | 11:34 |
Lennie | Merio, were you doing the selection pop-in? | 11:46 |
Lennie | list of users, you type a few letters | 11:46 |
Merio | Lennie: No, but I can join if helps | 11:47 |
Lennie | hmm | 11:47 |
Lennie | SRabbelier, do you have any idea what the status on that is? | 11:48 |
Merio | Lennie: seems there are many jquery plugins out there | 11:48 |
Lennie | ^_ ^ | 11:48 |
Lennie | JQuery ftw | 11:48 |
Lennie | I'll be needing your ToS viewer elsewhere as well | 11:48 |
Lennie | but not untill something else has been ironed out :) | 11:49 |
Merio | Seems to work smoothly in my box :) | 11:52 |
Lennie | o yeah, the ironing out is not on your part : | 11:53 |
Lennie | :P | 11:53 |
Merio | Just commenting the "JQuery ftw" ;) | 11:55 |
Merio | I was used to DojoToolkit... everything is tightly integrated there, but a bit to tricky to compress only-what-you-need features :) | 11:55 |
Merio | *too tricky | 11:55 |
Lennie | ok | 11:57 |
SRabbelier | hey | 12:14 |
Lennie | hi SRabbelier | 12:24 |
Lennie | could you answer my question about the picker :D? | 12:25 |
* SRabbelier reads backlog | 12:25 | |
SRabbelier | Lennie: we're still waiting for no_mind :-/ | 12:27 |
Lennie | aha ok | 12:27 |
Lennie | Merio, is also glad to help if needed | 12:27 |
SRabbelier | Merio: well, if you can get a hold of no_mind... :P | 12:27 |
Merio | SRabbeler: what do you mean? ;) | 12:34 |
SRabbelier | Merio: no_mind has been working on it | 12:35 |
SRabbelier | Merio: if you can get in contact with him feel free ot help him, or take over | 12:35 |
Merio | SRabbelier: did he post in the dev list? | 12:36 |
SRabbelier | Merio: no, otherwise you wouldn't have to get in contact with him :P | 12:36 |
SRabbelier | Merio: it seems he's "gone dark" :( | 12:36 |
Merio | SRabbelier: so just search in Google "no_mind"? :D | 12:36 |
SRabbelier | Merio: hehe, good luck :) | 12:37 |
Merio | SRabbelier: 2950 results, I can visit all of them to try to find emails and then spam 'em all :D | 12:39 |
SRabbelier | Merio: lol | 12:40 |
SRabbelier | Merio: he's an indian guy | 12:40 |
SRabbelier | Merio: maybe that'll narrow it down ;P | 12:40 |
Lennie | or Merio can do it, might just be a simple JQuery thingy :D | 12:53 |
Lennie | we need it bad right :p? | 12:53 |
Lennie | anyhow dinner :D | 12:53 |
*** Lennie is now known as Lennie|Food | 12:53 | |
SRabbelier | Merio: ah, that's right | 12:53 |
SRabbelier | Merio: is it a lot of work? | 12:53 |
Merio | SRabbelier: I've seen there are some autocompletion JQuery plugins out there, I should need to search and select the most practical for what we have already, but it will be only an integration issue: but we probably can give the list (plain text/XML/JSON, don't know) and the plugin will do the autocompletion for us automatically | 12:56 |
SRabbelier | Merio: have a look at http://localhost:8080/document/pick?continue=/foo/bar&field=foo_bar | 12:57 |
SRabbelier | Merio: it returns a JSON object already :) | 12:57 |
Merio | SRabbelier: just a minute, need to start the application after some emails I'm writing :) | 13:00 |
SRabbelier | Merio: np, no hurries | 13:00 |
Merio | SRabbelier: great, I see | 13:21 |
SRabbelier | Merio: I did that so no_mind would have somethign to work with; I expected him to be done in a day or two though :-/ | 13:22 |
MatthewWilkes | hmm, I'm having some issues with url patterns resolving back into objects | 13:27 |
Merio | SRabbelier: Well, I can go for it if you think it's better not to wait anymore | 13:27 |
SRabbelier | Merio: how long will it take you? :) | 13:28 |
SRabbelier | MatthewWilkes: do tell | 13:28 |
MatthewWilkes | I changed my key fields to be the key name of a reference and the link_id of another, but that caused /s in the keyname which doesn't fit the regex of the urlconf | 13:28 |
MatthewWilkes | so I changed it to use the __str__ of the key instead of its name, which looks like it should work, but I get 404s raised | 13:29 |
Merio | Don't know, if I can easily find a suitable plugin and if it works smoothly is a matter of minutes/an hour | 13:29 |
MatthewWilkes | so I'm thinking maybe I need to teach it how to resolve that pair? | 13:29 |
SRabbelier | Merio: go for it then :) | 13:29 |
Merio | SRabbelier: ^^^^^^^ | 13:29 |
Merio | SRabbelier: ok :) | 13:29 |
SRabbelier | MatthewWilkes: no, you need to instead change the urls to match your new key name ;) | 13:30 |
SRabbelier | MatthewWilkes: you should instead of making it the key name of the reference, make that reference your scope | 13:31 |
SRabbelier | MatthewWilkes: if you do that, the system will adjust the urls to match | 13:31 |
MatthewWilkes | SRabbelier: I don't follow, change the url pattern to allow for / seperated tokens in the first space? | 13:32 |
MatthewWilkes | ah | 13:32 |
SRabbelier | MatthewWilkes: that way you could even leave the key fields as they are are by default from Linkable | 13:32 |
SRabbelier | MatthewWilkes: all you have to do is set scope_logic to the appropriate logic, and you're done | 13:32 |
SRabbelier | MatthewWilkes: that's probably work_logic, right? | 13:33 |
MatthewWilkes | SRabbelier: Right.. I'm not using Linkable at the moment, it seemed like overkill and badly suited to the problem | 13:34 |
MatthewWilkes | (the link_ids etc) | 13:34 |
SRabbelier | MatthewWilkes: it's not overkill :) | 13:34 |
Merio | SRabbelier: this ==> http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/ should be suitable | 13:34 |
tpb | <http://ln-s.net/2nML> (at bassistance.de) | 13:34 |
SRabbelier | MatthewWilkes: and actually pretty well suited to the problem | 13:35 |
SRabbelier | Merio: cool :) | 13:35 |
SRabbelier | MatthewWilkes: linkable is for anything that has it's own ID | 13:35 |
SRabbelier | MatthewWilkes: (the comments do, they should get their id the same way notifications do) | 13:35 |
MatthewWilkes | SRabbelier: Right, ok | 13:35 |
SRabbelier | MatthewWilkes: and that has a scope, and the commetns have a scope, the work that they are made to | 13:35 |
* MatthewWilkes tries to think as a django developer | 13:35 | |
SRabbelier | Merio: that looks very nice | 13:35 |
SRabbelier | MatthewWilkes: it's our own system though, it's not from Django | 13:36 |
MatthewWilkes | SRabbelier: Ok, that makes sense, I'm assuming I can take care of the link_id, not force the user to add it? | 13:36 |
SRabbelier | MatthewWilkes: yes, please do | 13:36 |
SRabbelier | MatthewWilkes: have a look at how notifications do it | 13:36 |
Merio | SRabbelier: I'm going to integrate it only in the document template and posting in the mailing list, which file should I tweak? | 13:39 |
SRabbelier | Merio: probably just modify edit.html :) | 13:39 |
SRabbelier | Merio: erm, no wait | 13:39 |
SRabbelier | Merio: the various _as_table helpers | 13:39 |
SRabbelier | Merio: in soc/templates/templatetags | 13:40 |
Merio | SRabbelier: all 8 files? | 13:41 |
SRabbelier | Merio: you probably only need to edit the _as_table_row one | 13:42 |
SRabbelier | Merio: but feel free to poke around in them and see what happens if you change anything | 13:42 |
SRabbelier | Merio: the _as_twoline... ones are only used in club/org applications at the moment, so you can probably leave them alone | 13:42 |
SRabbelier | Merio: (as they _should_ just change when the regular version does) | 13:42 |
*** Lennie|Food is now known as Lennie | 13:51 | |
Merio | SRabbelier: is there a way in which I can easily access the id of each field from the context? | 13:57 |
SRabbelier | Merio: what template? | 13:57 |
Merio | I'm actually trying _as_table_row.html | 13:58 |
Merio | soc/templatetags as you said | 13:58 |
SRabbelier | Merio: it should be in the context of that template actually | 13:59 |
Merio | SRabbeleir | 13:59 |
SRabbelier | Merio: everything available in _as_table you can reach | 13:59 |
Merio | SRabbelier: otherwise I can cycle all the inputs | 13:59 |
SRabbelier | Merio: {% for field, required, example_text, reference in fields %} <---- | 13:59 |
SRabbelier | Merio: you have access to that | 13:59 |
Merio | SRabbelier: ok :) | 14:00 |
SRabbelier | Merio: or do you just need to know the id of the current field? | 14:00 |
Merio | SRabbelier: actually we need to extend with a new function every input with the proper data | 14:00 |
SRabbelier | Merio: sorry, I don't understand? | 14:01 |
Merio | SRabbelier: if you look at the end of this page ==> http://docs.jquery.com/Plugins/Autocomplete | 14:01 |
tpb | Title: Plugins/Autocomplete - jQuery JavaScript Library (at docs.jquery.com) | 14:01 |
Lennie | Merio | 14:02 |
Lennie | I cant get Thickbox to work :S | 14:02 |
Merio | SRabbelier: I need to access the input field (by ID or by class) to insert the proper data in. | 14:02 |
Merio | Lennie: what happens? Which browser? | 14:02 |
SRabbelier | Merio: but that's only the field for which you are doing the autocomplete right? | 14:03 |
Lennie | IE7 | 14:03 |
SRabbelier | Merio: cos that is available under the 'field' variable | 14:03 |
SRabbelier | Merio: so you can do {{ field.name }} | 14:03 |
Merio | SRabbelier: yes we have to pass data only to fields that actually needs it | 14:03 |
Lennie | I'll pm you | 14:03 |
SRabbelier | Merio: you should be able to use the django {{ field.name }} then | 14:04 |
Merio | SRabbelier: thanks, let me try something | 14:06 |
*** matthewwilkes_ has joined #melange | 14:06 | |
*** MatthewWilkes has quit IRC | 14:08 | |
Lennie | solydzajs! | 14:10 |
Lennie | ping | 14:10 |
solydzajs | pong | 14:10 |
Lennie | about the ToS | 14:10 |
Lennie | it should just show up on the profile page | 14:10 |
Lennie | in a scrollable box right | 14:10 |
Lennie | without the user clicking on something | 14:10 |
SRabbelier | http://www.viget.com/extend/effectively-using-git-with-subversion/ | 14:10 |
tpb | <http://ln-s.net/2nN5> (at www.viget.com) | 14:10 |
Lennie | since that is what Leslie wanted | 14:10 |
Lennie | http://code.google.com/p/soc/issues/detail?id=174 | 14:13 |
tpb | <http://ln-s.net/2m+l> (at code.google.com) | 14:13 |
Lennie | comment 7 | 14:13 |
Lennie | Merio | 14:13 |
Merio | Lennie: pong | 14:14 |
Lennie | ping:P | 14:14 |
Lennie | the thickbox doesn't auto-popup right? | 14:14 |
Merio | eheheh | 14:15 |
solydzajs | well I think it can show in click | 14:15 |
solydzajs | but not by going to different page | 14:15 |
solydzajs | you need to stay on the same page | 14:15 |
Lennie | solydzajs, it needs to be shown before you are able to accept it | 14:16 |
Merio | No, I show the ToS when someone clicks on the link | 14:16 |
Merio | As said to Lennie, if it were to be shown inline we could just enclose it in an overflow div | 14:17 |
Merio | (with a fixed height/width) | 14:17 |
Merio | However we need the thickbox.js as well to do the autocompletion thing, because it depends on it | 14:17 |
Merio | going to dinner, see you in a few minutes :) | 14:18 |
Lennie | k | 14:20 |
Lennie | Merio, if you could tell me what to change in edit.html to do that overflow thingy :D | 14:21 |
Lennie | that would be great | 14:21 |
*** matthewwilkes_ is now known as MatthewWiulkes | 14:22 | |
SRabbelier | Lennie: looks like you might have to buy a new pc if you want to test IE8 for us :P | 14:23 |
SRabbelier | Lennie: http://weblog.infoworld.com/enterprisedesktop/archives/2008/09/ie_8_consumes_m.html | 14:23 |
tpb | <http://ln-s.net/2nNL> (at weblog.infoworld.com) | 14:23 |
MatthewWiulkes | ... that's not my name | 14:23 |
*** MatthewWiulkes is now known as MatthewWilkes | 14:23 | |
Lennie | I have 4 GiG SRabbelier :P | 14:24 |
Lennie | should be fine :P | 14:24 |
SRabbelier | Lennie: article says you need at least 16 :D | 14:24 |
Lennie | does it? | 14:25 |
Lennie | hehe | 14:26 |
Lennie | ^_^ | 14:26 |
Merio | Lennie: <div id="ToS" style="overflow: auto" height="200px" width="300px">{{ tos_text_whatever }} </div> | 14:41 |
Lennie | k | 14:41 |
Lennie | I'll add that soon | 14:41 |
Lennie | I have broken something in that view ffs :P | 14:41 |
Merio | can change obviously the id, the height and width as you want | 14:41 |
Merio | :D | 14:42 |
Lennie | ^_ ^ | 14:42 |
SRabbelier | Lennie: I think I'm done refactoring | 14:44 |
SRabbelier | Lennie: but I haven't tested :P | 14:44 |
SRabbelier | Lennie: should I just commit? (A) | 14:44 |
Lennie | hehe | 14:45 |
SRabbelier | please? :( | 14:45 |
Lennie | I see a cyclic import here :D | 14:45 |
SRabbelier | Lennie: wooh | 14:45 |
Lennie | I broke stuff because you break stuff | 14:45 |
Lennie | and now you want to break stuff because I did it | 14:45 |
Lennie | You'd rather not import my fail routines :P | 14:45 |
SRabbelier | Lennie: ofc. I do | 14:45 |
solydzajs | i'm back | 14:48 |
SRabbelier | wb | 14:48 |
madrazr | Ok now its good time to bug you guys again, I can talk to all the 3 together, Lennie, SRabbelier and solydzajs :P | 14:50 |
SRabbelier | hehehe | 14:50 |
* SRabbelier runs away | 14:50 | |
* Lennie is off | 14:50 | |
solydzajs | hehe :-) | 14:50 |
solydzajs | madrazr: what's up ? | 14:50 |
madrazr | ha ha ha :D | 14:50 |
madrazr | the problem I mentioned other day is not yet fixed, I take the blame on myself | 14:50 |
SRabbelier | madrazr: hehe, what problem is it again? ^__^ | 14:50 |
madrazr | there is no message whenever some new entity is created | 14:51 |
madrazr | SRabbelier: I tried prefix='create' thingie you suggested the other day | 14:51 |
madrazr | but seems like it doesn't work or I am getting it completely wrong | 14:51 |
SRabbelier | madrazr: ah, right | 14:51 |
Lennie | grmbl | 14:53 |
madrazr | how to go about it? can you tell it briefly again? when a new entity is created, the calls go from create->edit->editGet IIRC | 14:55 |
SRabbelier | madrazr: I think easiest fix | 14:55 |
madrazr | SRabbelier: whats that? | 14:55 |
SRabbelier | madrazr: is to change the isSelfRefferrer | 14:55 |
madrazr | SRabbelier: in what way? | 14:56 |
SRabbelier | madrazr: to make it just check if the value from os.environ['HTTP_HOST'] matches the first part of the refferrer | 14:56 |
madrazr | SRabbelier: looking at it | 14:58 |
SRabbelier | def isReferrerSelf(request): | 14:58 |
SRabbelier | http_from = request.META.get('HTTP_REFERER') | 14:58 |
SRabbelier | http_host = os.environ['HTTP_HOST'] | 14:58 |
SRabbelier | return http_from.startswith(http_host) | 14:58 |
SRabbelier | Lennie: ok, did some basic testing, going to commit now :P | 15:00 |
SRabbelier | Lennie, solydzajs: I can't test it thoroughly enough all by myself, so please help out | 15:00 |
Lennie | you are soooo gonna break stuff :p | 15:01 |
SRabbelier | Lennie: I know | 15:01 |
SRabbelier | Lennie: that's why I'm telling you to test ^__^ | 15:01 |
Lennie | grmbl | 15:06 |
Lennie | I hate HTML :p | 15:06 |
SRabbelier | hahah | 15:06 |
SRabbelier | why? | 15:06 |
Lennie | it's a hidden field | 15:06 |
Lennie | but it still shows it :P | 15:06 |
SRabbelier | why? | 15:06 |
Lennie | because I call {% field_as_table_row form.agreed_tos_on %} | 15:07 |
Lennie | ? | 15:07 |
Lennie | because I have to | 15:07 |
Lennie | because user_profile had to be so explainatory | 15:07 |
SRabbelier | lol | 15:07 |
SRabbelier | then split them | 15:07 |
SRabbelier | retard :P | 15:07 |
Lennie | split what :D? | 15:07 |
SRabbelier | have the explanation and the field in two different things | 15:07 |
SRabbelier | and only display the explanation if you need to display the field | 15:07 |
Lennie | :S | 15:07 |
Lennie | they are two different things | 15:07 |
Lennie | I need this field to be hidden | 15:08 |
SRabbelier | then what's the problem? ^_^ | 15:08 |
Lennie | because it needs to be submitted | 15:08 |
Lennie | the field wont hide | 15:08 |
Lennie | the label still shows up :P | 15:08 |
SRabbelier | Lennie: lol | 15:08 |
SRabbelier | Lennie: you can't have hidden fields behave like hidden fields if you're not using as_talbe | 15:08 |
SRabbelier | **as_table | 15:08 |
SRabbelier | Lennie: you'll have to manually do | 15:08 |
SRabbelier | {% if I need to display field %} | 15:08 |
SRabbelier | {% field_as_table_row form.agreed_tos_on %} | 15:08 |
SRabbelier | {% endif %} | 15:09 |
Lennie | and else I have to force it to be hidden? | 15:09 |
SRabbelier | you can't? | 15:09 |
Lennie | then this will not work :S | 15:09 |
SRabbelier | yes it will | 15:09 |
SRabbelier | by not displaying it if the need to display is false :P | 15:09 |
SRabbelier | you just don't render it at all | 15:09 |
Lennie | no | 15:09 |
SRabbelier | the ultimate form of hidden-ness! | 15:09 |
Lennie | it needs to be in there | 15:10 |
Lennie | else the check fails remember? | 15:10 |
SRabbelier | then solve it yourself :P | 15:10 |
SRabbelier | you're just telling me "no this won't work" | 15:10 |
Lennie | becuase it wont :D | 15:10 |
SRabbelier | how am I supposed to do anything with that :P | 15:10 |
SRabbelier | I'll "throw you a bone" a few times, but not >2 :P | 15:10 |
Lennie | and as I told you it needs to be submitted by the submit button else the check will fail | 15:11 |
SRabbelier | then change that :) | 15:11 |
Lennie | I could make the check more uglier lol | 15:11 |
SRabbelier | or add a new helper | 15:11 |
SRabbelier | instead of {% field_as_table_row form.agreed_tos_on %} | 15:12 |
SRabbelier | have {% hidden_field_as_table_row form.agreed_tos_on %} | 15:12 |
*** Lennie is now known as Lennie|Gone | 15:17 | |
SRabbelier | OMG | 15:18 |
SRabbelier | I'm going to kill eric wong :P | 15:18 |
SRabbelier | I dunno wtf he did, but git-svn is slow as *** today! | 15:18 |
MatthewWilkes | SRabbelier: Where are notifications created from? Could do with some context | 15:18 |
SRabbelier | Lennie|Gone: care to explain? | 15:18 |
SRabbelier | MatthewWilkes: hehe, guess not | 15:21 |
SRabbelier | MatthewWilkes: ok, Notifications are created when something happens the user needs to take action upon | 15:22 |
SRabbelier | MatthewWilkes: for example, when a request is made | 15:22 |
MatthewWilkes | SRabbelier: Right, so is it done by code or TTW? | 15:23 |
SRabbelier | MatthewWilkes: what's TTW? but yes, the code does it | 15:23 |
MatthewWilkes | through the web | 15:23 |
MatthewWilkes | SRabbelier: Ok, so for now the way I was passing the scope around with the encoded key, but that feels like the wrong way of doing it | 15:25 |
MatthewWilkes | Was trying to understand the notifications example better | 15:25 |
SRabbelier | MatthewWilkes: yes, quite so, why do you need to encode it? :-/ | 15:25 |
MatthewWilkes | I'm not sure how the create form gets the scope object, if I have access to the key it's easy | 15:26 |
SRabbelier | MatthewWilkes: well, the idea is that the comment is made on the same page as the Work's view It hink? | 15:27 |
SRabbelier | MatthewWilkes: so if you are on teh Work's view page, you always have access to it | 15:27 |
MatthewWilkes | yeah, but it needs to go via the view class of the comment still, doesn't it? | 15:28 |
SRabbelier | MatthewWilkes: uhm, I thought the comments of a Work would be displayed on the same page? | 15:29 |
MatthewWilkes | SRabbelier: Yeah, they would | 15:31 |
MatthewWilkes | This is part of the reason I though Linkable was overkill | 15:31 |
MatthewWilkes | you don't care about a lot of the pages you get with most types at the moment | 15:32 |
MatthewWilkes | still, you'd want a view class either way, where else would you put the code? | 15:32 |
SRabbelier | MatthewWilkes: yeah sure | 15:32 |
SRabbelier | MatthewWilkes: you could give it as an argumetn to the create page | 15:33 |
SRabbelier | MatthewWilkes: that's how we do it with most scoped entities | 15:33 |
SRabbelier | MatthewWilkes: like when you create a new program, you have to choose a Host first | 15:33 |
SRabbelier | MatthewWilkes: and when you then select 'google', you are directed to /program/create/google' | 15:34 |
Merio | SRabbelier: the autocompletion is working in my box, need to fix it a bit as it seems I can't access field.name in _as_table_row.html, probably I'm missing something. The script however is working if hardcoded | 15:34 |
Merio | Need to go away now, will work on it tomorrow and let you know :) | 15:34 |
MatthewWilkes | an argument to the create page? | 15:34 |
MatthewWilkes | ah | 15:34 |
MatthewWilkes | SRabbelier: So, where is it that the "google" there gets translated into the google entity? | 15:36 |
SRabbelier | MatthewWilkes: it uses the scope_logic, does something like scope_logic.getForKeyName(scope_path) | 15:37 |
SRabbelier | MatthewWilkes: (as the scope_path will be equal to the key name of the scope entity) | 15:37 |
*** madrazr has quit IRC | 15:50 | |
MatthewWilkes | SRabbelier: Right! So, program has a create URLconf entry which takes a scope_path field, that makes that value available to the view when the program logic is asked to extract the parameters. Once I have that I can call the logic of the scope object (as I know the type it will be) to get the object itself | 15:53 |
MatthewWilkes | correct? | 15:53 |
SRabbelier | MatthewWilkes: there's already such a field :) | 15:53 |
SRabbelier | **entry | 15:53 |
SRabbelier | MatthewWilkes: there is/should be a create that has %(scope)s as it's suffix | 15:54 |
SRabbelier | from params.py: if not params.get('no_create_with_scope'): | 15:54 |
SRabbelier | new_params['django_patterns_defaults'] += [ | 15:54 |
SRabbelier | (r'^%(url_name)s/(?P<access_type>create)/%(scope)s$', | 15:54 |
SRabbelier | 'soc.views.models.%(module_name)s.create', 'Create %(name_short)s')] | 15:54 |
MatthewWilkes | yeah, I'm thinking out loud, I saw that (well, actually I caused a 500 in urlconf and read the errors) | 15:55 |
SRabbelier | MatthewWilkes: that's how I do it usually ^__^ | 15:56 |
MatthewWilkes | so, if I went to /comment/create/user/matthewwilkes/foo/bar (or whatever) I should get params['scope'] which contains enough information for me to get the bar document from work.logic | 16:00 |
SRabbelier | MatthewWilkes: what's the '/user' thing for? | 16:00 |
SRabbelier | MatthewWilkes: it might actually make sense to do the same as what I did for document | 16:01 |
SRabbelier | MatthewWilkes: disable the %(scope) link and add one that has all the fields but link_id | 16:01 |
SRabbelier | MatthewWilkes: so that you can take the user as params['user'] | 16:02 |
MatthewWilkes | well, you don't know what the full chain of the scope will be, in 'user' there it's because it's a user document made by me | 16:02 |
SRabbelier | MatthewWilkes: oooh, that's the prefix of the document? :) | 16:03 |
SRabbelier | MatthewWilkes: sorry, my bad :) | 16:03 |
MatthewWilkes | eg: http://127.0.0.1:8080/document/edit/user/matthewwilkes/foo | 16:03 |
SRabbelier | right :) | 16:03 |
SRabbelier | MatthewWilkes: sorry, I wasn't thinking for a moment :) | 16:04 |
MatthewWilkes | Sorry, my lappy is being slow, hangs every now and again when I hit enter | 16:04 |
SRabbelier | MatthewWilkes: the key name of the document would be "user/matthewwilkes/foo" | 16:04 |
SRabbelier | MatthewWilkes: so if you have "/comment/create/user/matthewwilkes/foo", you can defnitely do document_logic.getForKeyName(scope_path) | 16:04 |
MatthewWilkes | excellent | 16:05 |
SRabbelier | MatthewWilkes: btw, not params['scope'], since params is a pre-defined dictionary | 16:05 |
SRabbelier | MatthewWilkes: you should write your method to accept **kwargs | 16:06 |
SRabbelier | MatthewWilkes: then **kwargs will be the keywords you get form django (the ones matched in teh regexp) | 16:06 |
SRabbelier | MatthewWilkes: so you would do getForKeyName(kwargs['scope_path']) | 16:06 |
SRabbelier | MatthewWilkes: not sure if you knew that already | 16:06 |
MatthewWilkes | SRabbelier: by method, do you mean the View class, or a new method hooked up with some urlconf magic? | 16:07 |
SRabbelier | MatthewWilkes: the method hooked up, which will be a method of your View class | 16:08 |
SRabbelier | MatthewWilkes: e.g., like base.View.edit | 16:08 |
SRabbelier | in soc.views.models.base | 16:08 |
MatthewWilkes | oh, awesome, I can just override that | 16:09 |
SRabbelier | MatthewWilkes: yup, you can; but do you need to? | 16:09 |
SRabbelier | MatthewWilkes: if you set up the comment.Logic class correctly you might not even have to | 16:09 |
MatthewWilkes | SRabbelier: right, ok, I'm going to have a go, thanks for your help, it's much appreciated | 16:10 |
MatthewWilkes | I'll likely be back soon! | 16:10 |
SRabbelier | MatthewWilkes: ok awesome! | 16:10 |
SRabbelier | MatthewWilkes: dont' hesitate to ask :) | 16:10 |
*** Lennie|Gone is now known as Lennie | 16:45 | |
*** dmitrig01|afk has joined #melange | 16:45 | |
*** ChanServ sets mode: +v dmitrig01|afk | 16:45 | |
*** dmitrig01|afk has quit IRC | 17:13 | |
Lennie | Merio | 17:40 |
Lennie | ping | 17:40 |
Lennie | <div id="ToS" style="overflow:auto" height="200px" width="400px"> | 17:41 |
SRabbelier | Lennie: OMG | 17:41 |
SRabbelier | Lennie: wtf have you been? | 17:41 |
SRabbelier | s/w/where/ | 17:41 |
Lennie | WoW? | 17:41 |
SRabbelier | Lennie: hahha, you lazy b-tard! | 17:41 |
SRabbelier | s/-/as/ | 17:41 |
Lennie | I have been back an hour | 17:41 |
SRabbelier | Lennie: heheh, ok :P | 17:41 |
Lennie | I'm going to bed soon | 17:41 |
Lennie | my I have too much time for Melange period is over :P | 17:42 |
SRabbelier | Lennie: I fixed the list issue :) | 17:42 |
Lennie | YOU RUL! | 17:42 |
Lennie | E | 17:42 |
Lennie | !! | 17:42 |
Lennie | :) | 17:42 |
Lennie | once more you save Melange :P | 17:42 |
Lennie | anyhow | 17:42 |
Lennie | Merio, could you please create a patch for me that makes the scrolling happen with a good height and widht :D? | 17:42 |
Lennie | since I can't get it to work here | 17:42 |
SRabbelier | Lennie: you better be damn grateful, I had to fix JS to make it work properly | 17:42 |
Lennie | JS | 17:43 |
Lennie | omg :P | 17:43 |
Lennie | you can cry your hearth out at M :p | 17:43 |
Lennie | heart | 17:43 |
SRabbelier | hehehe :P | 17:43 |
SRabbelier | Lennie: it was Todd's JS on top | 17:43 |
SRabbelier | Lennie: debugging someoen else's code is not nice! | 17:43 |
Lennie | :D | 17:44 |
SRabbelier | Lennie: especially not if that code is in JS!!! | 17:44 |
SRabbelier | multiple exlamation marks! | 17:44 |
Lennie | SRabbelier: you should see my ugly temp fix patch :D | 17:44 |
Lennie | lambda function lol :P | 17:44 |
SRabbelier | Lennie: mhhh, maybe not :P | 17:44 |
Lennie | Pawel is fixing me a template tag since I suck :D | 17:44 |
MatthewWilkes | ok, I'm going crazy, the url pattern for program looks very different to the one I have for comment and I can't see what's causing it | 17:45 |
Lennie | program doesnt have work_flow anymore? | 17:45 |
SRabbelier | MatthewWilkes: mhhh, probably difference in scope_logic :) | 17:45 |
MatthewWilkes | # ^program/(?P<access_type>create)/(?P<scope_path>[a-z](?:[0-9a-z]|_[0-9a-z])*(?:/[a-z](?:[0-9a-z]|_[0-9a-z])*)*)$ | 17:45 |
MatthewWilkes | # ^comment/(?P<access_type>create)/(?P<scope_path>)$ | 17:45 |
SRabbelier | MatthewWilkes: yup, program has scope_logic set | 17:45 |
SRabbelier | MatthewWilkes: ah, and obviously you do not :P | 17:45 |
SRabbelier | oh wait | 17:46 |
SRabbelier | MatthewWilkes: do you have it set to Work? | 17:46 |
SRabbelier | MatthewWilkes: as Work does not have it set! | 17:46 |
SRabbelier | MatthewWilkes: if that's the case, change yours to linkable, like Document does | 17:46 |
MatthewWilkes | ahh, it's a kwarg to logic! | 17:47 |
MatthewWilkes | I'd been setting scope_view | 17:47 |
SRabbelier | MatthewWilkes: you need that one too, for the scope selection to work | 17:47 |
SRabbelier | MatthewWilkes: sorry for not having documented all this :( | 17:48 |
SRabbelier | MatthewWilkes: you could be epic win and document what you've learned? (A) | 17:48 |
MatthewWilkes | I'll give it a go, but once I actually know what I've learned | 17:49 |
SRabbelier | MatthewWilkes: right :), that'd be awesome :) | 17:49 |
Lennie | ^_^ | 17:49 |
Lennie | and he's calling me lazy :D | 17:49 |
* MatthewWilkes knows the value of docs - am an editor for one of the sections of plone's docs | 17:50 | |
MatthewWilkes | I spend so much time bugging people to contribute ;) | 17:50 |
Lennie | ^_^ | 17:50 |
SRabbelier | MatthewWilkes: hehehe, cool! :D | 17:50 |
MatthewWilkes | boom shack a lack! | 17:54 |
SRabbelier | MatthewWilkes: does that mean it worked? | 17:55 |
MatthewWilkes | yuyp | 17:55 |
SRabbelier | MatthewWilkes: sweet! | 17:55 |
MatthewWilkes | yup* | 17:55 |
solydzajs | MatthewWilkes: hey man, what's the status ?;-) | 18:02 |
MatthewWilkes | solydzajs: I've been in a world of pain, but SRabbelier has been a great help. I'm just hooking up the scope correctly (which is quite differently to how I was doing it yesterday!) | 18:04 |
*** Lennie has quit IRC | 18:04 | |
MatthewWilkes | I had been passing the str() of a key around and having no scope, instead of getting it via the logic | 18:04 |
solydzajs | i'm happy it's solved :-) | 18:04 |
solydzajs | so what is working and what is not working yet ? | 18:05 |
MatthewWilkes | I've just broken commenting to get it working correctly, just need to wire up lookup to populate the reference field to get that working again | 18:06 |
MatthewWilkes | Also, got a link to add new comments on document pages | 18:06 |
MatthewWilkes | and a comment counter and show first comment, not looping yet | 18:06 |
MatthewWilkes | it's currently anyone can comment | 18:07 |
MatthewWilkes | Sorry it's taking so long, I massively overestimated how much I understood how the app was working! | 18:07 |
MatthewWilkes | Thought I'd worked it out about 5 times now | 18:07 |
SRabbelier | MatthewWilkes: you're doing a nice job in catching up :) | 18:08 |
solydzajs | MatthewWilkes: how did you implemented comments counter ? sharding counter ? | 18:08 |
solydzajs | MatthewWilkes: yep thx for all your work man :-) | 18:08 |
MatthewWilkes | solydzajs: No, it's just a simple db.Query.count. I appreciate we'd want to cache that on an object but I didn't want to go messing with schemata for an optimisation when you guys are trying to get things nailed down | 18:09 |
MatthewWilkes | it's not like it's something that can't be brought in quite easily alter | 18:09 |
solydzajs | ok we will optimize it later no worries :-), when do you think you can be done ? | 18:10 |
solydzajs | done with it I mean :-) | 18:11 |
SRabbelier | MatthewWilkes: we can use memcache to cache that, no worries, we're doign that already for the entire sidebar :) | 18:12 |
MatthewWilkes | Hmm, how can I turn a key name into an object without knowing anything more than the class is a subclass of Work? The linkable_logic doesn't seem to pick it up | 18:13 |
SRabbelier | MatthewWilkes: nope, that doesn't work | 18:13 |
SRabbelier | MatthewWilkes: you'll need to use work_logic explicitly | 18:13 |
SRabbelier | MatthewWilkes: if it's a work instance | 18:13 |
SRabbelier | MatthewWilkes: sadly, GAE doesn't actually support inheretance | 18:13 |
SRabbelier | MatthewWilkes: so you'll have to use the right subclass | 18:13 |
MatthewWilkes | solydzajs: Honestly, I'd not like to estimate right now, I've felt on the threshold for a week or so now, I can send a patch for commenting on documents with a basic view ui by anyone tonight | 18:14 |
SRabbelier | MatthewWilkes: please do send :) | 18:15 |
MatthewWilkes | solydzajs: But the display UI wouldn't be done _correctly_, it'd be a cludge, and I don't know what I don't know about the access system yet | 18:15 |
MatthewWilkes | SRabbelier: *sigh* ;) | 18:15 |
SRabbelier | MatthewWilkes: tell me about it :P | 18:16 |
SRabbelier | I should go to bed guys | 18:21 |
SRabbelier | have to get up early tomorow :) | 18:21 |
solydzajs | ok | 18:24 |
solydzajs | I will go to bed soon too | 18:24 |
SRabbelier | ok man :) | 18:24 |
MatthewWilkes | night SRabbelier! | 18:24 |
SRabbelier | solydzajs: do we have conference call tomorrow? | 18:24 |
MatthewWilkes | Thanks for the help! | 18:24 |
SRabbelier | MatthewWilkes: you're welcome, good luck! | 18:24 |
solydzajs | SRabbelier: yes | 18:24 |
solydzajs | SRabbelier: as scheduled | 18:25 |
SRabbelier | solydzajs: ok, how late, and what number? it's not on my calendar | 18:25 |
solydzajs | SRabbelier: one sec | 18:25 |
solydzajs | SRabbelier: you are listed as waiting for response | 18:26 |
SRabbelier | solydzajs: oh, weird | 18:26 |
solydzajs | [email protected] | 18:26 |
SRabbelier | oh | 18:27 |
SRabbelier | lol | 18:27 |
SRabbelier | i see now | 18:27 |
SRabbelier | the day changed :) | 18:27 |
SRabbelier | so I was hitting 'next week' :P | 18:27 |
SRabbelier | nvm, I see itn ow | 18:27 |
solydzajs | ok | 18:27 |
solydzajs | till tomorrow then | 18:27 |
SRabbelier | cheers :0 | 18:28 |
*** SRabbelier has quit IRC | 18:30 | |
*** solydzajs has quit IRC | 18:30 | |
*** mithro has quit IRC | 19:05 | |
*** Merio has quit IRC | 19:16 | |
MatthewWilkes | ahhh :) | 19:33 |
*** MatthewWilkes has quit IRC | 20:19 | |
*** mithro has joined #melange | 20:46 | |
*** ChanServ sets mode: +v mithro | 20:46 | |
*** dmitrig01|afk has joined #melange | 21:13 | |
*** ChanServ sets mode: +v dmitrig01|afk | 21:14 | |
*** madrazr has joined #melange | 22:56 | |
*** johndbritton has joined #melange | 22:59 | |
*** madrazr has left #melange | 23:04 | |
*** dmitrig01|afk is now known as dmitrig01 | 23:26 |
Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!