Thursday, 2014-03-27

*** tpb has joined #melange00:00
*** asmeurer_ has joined #melange00:13
*** monkegjinni has quit IRC00:14
*** monkegjinni has joined #melange00:15
*** monkegjinni has quit IRC00:19
*** madrazr has joined #melange00:38
*** ChanServ sets mode: +o madrazr00:38
*** ashishk has joined #melange00:47
*** shikher has joined #melange00:54
shikhermadrazr: ping00:54
madrazrshikher: pong00:54
*** suranga has quit IRC00:55
shikhermadrazr: I am looking at this forms.py, but I am not sure where to add a class scope constant. I am supposed to add it to the meta class, I believe and tht would mean __new__()00:58
shikherhttps://code.google.com/p/soc/source/browse/app/soc/views/forms.py#43700:58
tpb<http://ln-s.net/BcFm> (at code.google.com)00:58
shikhersince u hve written this code....u wud be the best person to tell me :)00:58
*** paradoq has joined #melange00:59
madrazrshikher: add it to actual forms class01:02
madrazrdon't touch the meta class unless it is absolutely necessary01:02
madrazrmeta class is all black magic in there01:03
madrazrdon't even bother going that route unless you are up for fighting some sorcery :P01:03
madrazrshikher: in the actual forms class, just add it as class level attributes01:04
shikhermadrazr: shud i globally declare the constant first and then assign it to modelForm class, or directly write self.ABC  = ugettext('value')?01:07
shikherassign it in modelForm class *01:08
*** asmeurer_ has quit IRC01:08
madrazrshikher: there are two different questions you are asking here :)01:10
madrazrshikher: I will directly write answers though :P01:10
*** bitgeeky has quit IRC01:12
*** allenZ|afk has quit IRC01:12
*** scorche` has quit IRC01:12
*** terceiro has quit IRC01:13
*** suranga has joined #melange01:16
madrazrshikher: ping01:17
madrazrshikher: testing if I can still reach you due to netsplit01:17
shikhermadrazr: yes01:18
madrazrshikher: Ok01:18
madrazrinstead of writing all the details in English, I went ahead and wrote the snippet code01:18
madrazrwhich explains things easily01:18
madrazrhttps://gist.github.com/madhusudancs/979787001:18
tpbTitle: submit_button.py (at gist.github.com)01:18
madrazrthat is how your code should look01:18
shikherthnx for tht. but y not inside the init() function, as self.ABC?01:19
madrazrshikher: you don't want self.01:19
madrazrshikher: we want it to be a class-level constant01:19
madrazrshikher: self. is used to access an instance attribute01:20
madrazri.e. an object attribute01:20
madrazrshikher: self is an object01:20
shikhermadrazr: my bad.01:20
madrazrlike you would do01:20
madrazrmyobj = MyClass()01:20
madrazrmyobj.CONSTANT = "BLA"01:20
madrazrself.CONSTANT = "BLA"01:21
madrazris equivalent01:21
shikhermadrazr: I see the mistake. thnx01:21
madrazryou use self inside the class itself01:21
madrazrshikher: Ok01:21
*** rvraghav93 has quit IRC01:25
shikhermadrazr: wat is the import doing here? https://gist.github.com/shikher/ebe46f465dc754d0dc8b01:35
tpbTitle: wierd (at gist.github.com)01:35
shikherthis is in soc/views/site.py01:36
madrazrshikher: please, please link to our source files01:36
madrazrif you paste things out of context01:36
madrazrhow do I figure out what you are referring to01:36
madrazrironically enough01:36
madrazrthis method is called "context" :P01:37
shikhermadrazr: :D here it is https://code.google.com/p/soc/source/browse/app/soc/views/site.py01:37
tpb<http://ln-s.net/BcMx> (at code.google.com)01:37
shikherline 11301:38
madrazrshikher: for future reference, you can even link to the exact line01:38
madrazrby clicking on the line number01:38
madrazrshikher: https://code.google.com/p/soc/source/browse/app/soc/views/site.py#11301:38
madrazrlike that01:38
tpb<http://ln-s.net/BcN9> (at code.google.com)01:38
shikhermadrazr: noted.01:38
*** jasvir has joined #melange01:45
brlcadmadrazr: i'm unable to fill in more than one custom column field before having to refresh (otherwise gives a 400 error) -- known issue/01:47
brlcad? even01:47
*** rvraghav93 has joined #melange01:47
*** allenZ|afk has joined #melange01:49
*** scorche` has joined #melange01:49
*** terceiro has joined #melange01:49
ollybrlcad: yes01:53
ollyhttp://code.google.com/p/soc/issues/detail?id=214101:53
tpb<http://ln-s.net/BWhK> (at code.google.com)01:53
madrazrbrlcad: yeah01:54
madrazrbrlcad: more in the issue olly linked to01:55
madrazrbrlcad: sadly, it is the library that we use (jqgrid)01:55
madrazrwe have been trying to fight against it from years now01:55
madrazrno success yet01:55
madrazronly if more people understood Javascript ;-)01:56
madrazrwe would have probably had a fix :P01:56
brlcadhuh, I guess I forgot encountering it in previous years or figured out the same workaround (refresh) and ran with it01:57
brlcadwe're used the custom field every year, but this is the first time it really bit us trying to fill in a lot of custom data01:58
ollyit's annoying you can enter dozens of values and only then discover it saved just the first01:58
brlcador an entire column...01:58
madrazrshikher: what about that import (sorry I got distracted by some discussion here)01:58
madrazrshikher: ?01:58
ollyit did ring a bell once I hit it - I was surprised nobody seemed to have reported it before01:58
madrazrshikher: what exactly is your question?01:59
madrazrshikher: why is the import inside a function?01:59
shikhermadrazr: yes01:59
madrazrshikher: or why are we importing a GSoC class?01:59
shikherno01:59
madrazrshikher: work around to beat cyclic imports problem01:59
brlcadmadrazr: plenty of devs know javascript... that's why they don't write javascript :)01:59
jasvirmadrazr: I have started working on updating text editor. If you can give me some suggestion or notes or link to any discussion regarding updation, it'll help me lot.02:03
jasvirmadrazr: I found this in tinyMCE docs : http://www.tinymce.com/wiki.php/Tutorial:Migration_guide_from_3.x .02:03
tpb<http://ln-s.net/BcSP> (at www.tinymce.com)02:03
jasvirmadrazr: In melange, I have tried :02:03
jasvirmadrazr: 1. replacing existing folder with latest version.02:03
*** paradoq has quit IRC02:04
jasvirmadrazr: 2. changing settings in app/soc/content/js/melange.js02:04
madrazrolly: carol reports every year02:04
madrazrolly: every single year asking us if we have made her life any better :P02:04
madrazrolly: she says this problem is a bane of Melange02:05
ollyit is one of the more annoying ones if you use custom columns02:05
madrazrolly: yeah, I agree02:06
madrazrshikher: you got your answer right?02:06
jasvirmadrazr: 3. changing "/tiny_mce/tiny_mce.js" in  app/soc/contents/js/melange.dependency.js to "/tinymce/tinymce.min.js""02:06
madrazrshikher: I hope that's what you were looking for?02:06
shikhermadrazr: yes. thnx.02:06
madrazrjasvir: I don't think we have documented anything with tinyMCE updates other than Mario posting to our mailing lists announcing that he updated the version02:08
jasvirmadrazr: And after all this changing links in template files.02:08
madrazrjasvir: wait02:08
madrazrwhat links did you change in template files?02:08
madrazrjasvir: show me the diffs?02:08
jasvirmadrazr: wait02:08
jasvirmadrazr: http://paste.ubuntu.com/7160409/02:12
tpbTitle: Ubuntu Pastebin (at paste.ubuntu.com)02:12
*** Niharika has joined #melange02:12
madrazrjasvir: Ok02:14
madrazrnow my question02:14
madrazrjasvir: what's the reason behind calling the new file tiny_mce.min.js when the previous tiny_mce.js was also a minified version?02:14
jasvirmadrazr: because tinymce have changes there structure. They have changes files, themes i.e; structure of module.02:15
jasvirmadrazr: http://www.tinymce.com/wiki.php/Tutorial:Migration_guide_from_3.x02:16
tpb<http://ln-s.net/BcSP> (at www.tinymce.com)02:16
*** kdh-1334_____ has quit IRC02:16
*** kdh-1334 has quit IRC02:16
olly.min.js seems to be an emerging convention02:17
*** kdh-1334_____ has joined #melange02:33
*** kdh-1334 has joined #melange02:33
*** rvraghav93_ has joined #melange02:46
*** rvraghav93 has quit IRC02:47
ashishkmadrazr: I have commited my code for issue 1541,please review it when you are free02:58
*** ashishk has quit IRC03:01
madrazrjasvir: the question I still have is03:03
madrazrdo we have to play along those lines03:04
madrazrcommitting the files with old names seems to be easier03:04
madrazrbut also on the other hand03:04
madrazrjasvir: we are spending time and energy on this upgrade path03:04
madrazrso let us set things right as well03:05
madrazris another argument03:05
madrazrjasvir: I think latter seems to make more sense03:05
madrazrjasvir: go with new file names03:05
madrazrjasvir: and now, what was your original question?03:05
madrazrjasvir: you said (07:08:12 PM) jasvir: madrazr: And after all this changing links in template files.03:05
madrazrjasvir: did it work after making changes to files?03:06
jasvirmadrazr: Still it's not working. But I am looking deeper into it. I was just asking that if there was some earlier discussion, please give me link to that.03:07
*** paradoq has joined #melange03:08
madrazrjasvir: not any I am aware of03:09
madrazrjasvir: that I answered already03:09
jasvirmadrazr: Yeah. I got it.03:10
jasvirmadrazr: This time, I'll make a documentation for updation. It'll help devs in future.03:11
madrazrjasvir: awesome!03:13
madrazrjasvir: +1 on that03:13
shikhermadrazr: can't figure out how to change value of SUBMIT_BUTTON_TEXT in this file. https://code.google.com/p/soc/source/browse/app/soc/modules/gci/views/profile.py03:26
tpb<http://ln-s.net/BcgM> (at code.google.com)03:26
madrazrshikher: which class?03:26
shikheredit or create profile.03:27
shikhermadrazr: either03:27
jasvirmadrazr: :)03:28
*** paradoq has quit IRC03:28
*** samgtr has joined #melange03:28
madrazrshikher: your question is not clear to me03:29
madrazrI don't see SUBMIT_BUTTON_TEXT anywhere there03:29
madrazrwhat do you have to change?03:29
madrazrshikher: or what do you want to change when it does not even exist?03:30
shikhermadrazr: well, I need to change it, in the sense tht I need to pass it along with the form itself. Since, there is no context for passing the form, how to pass tht value?03:34
shikherpass it to the template03:34
madrazrshikher: I am not sure I understand the question03:38
madrazrshikher: why will a form class have a context() method?03:38
madrazrshikher: can I please ask you to state your questions correctly? With specific details?03:39
shikhermadrazr: right. so I tried changing the value in https://code.google.com/p/soc/source/browse/app/soc/views/profile.py#231 , but still nothing. wat am i doing wrong?03:39
tpb<http://ln-s.net/BciV> (at code.google.com)03:39
madrazrthrowing in some information here and there will only add to the back-and-forth03:39
madrazrand kills both of our productive time that could have been well spent making Melange better03:40
madrazrshikher: show me your diff03:40
madrazrshikher: entire diff03:40
madrazrshikher: may be push it to your clone/branch on google code?03:41
*** rvraghav93_ has quit IRC03:42
shikhermadrazr: ok03:43
*** rvraghav93 has joined #melange03:44
shikhermadrazr: https://code.google.com/r/shikher111-melange-soc/source/detail?r=9dcbe43dd9725ba169f9fba9be79adf670613466&name=issue_2022_submit_button_value03:46
tpb<http://ln-s.net/Bcjk> (at code.google.com)03:46
shikherIgnore the out file03:46
*** rvraghav93 has quit IRC03:50
*** rvraghav93 has joined #melange03:52
*** rvraghav93_ has joined #melange03:56
*** rvraghav93 has quit IRC03:57
*** rvraghav93 has joined #melange04:03
*** rvraghav93_ has quit IRC04:04
*** robbyoconnor has joined #melange04:09
*** kdh-1334 has quit IRC04:09
*** kdh-1334_____ has quit IRC04:09
madrazrshikher: is this is the first form you are trying?04:16
shikhermadrazr: yes04:16
madrazrshikher: or you have tried it on other forms and you have it working there?04:16
madrazrshikher: Ok04:16
madrazrlooked like04:16
madrazrthat04:16
madrazrshikher: give me a few mins04:17
madrazrI need to verify something before I make my point04:17
shikhermadrazr: i know its not right...but I was stuck bad. sure.04:18
madrazrshikher: no problem04:18
madrazrI think the problem is with class level attribute04:18
madrazrand form.SUBMIT_BUTTON_TEXT04:18
madrazrform is an object04:18
madrazrDjango template is not picking up the right attribute value is my feeling04:18
madrazrI need to verify this though04:18
madrazrif you can verify this for me, that will be a favor :)04:19
madrazrshikher: btw style issue04:19
madrazrshikher: you should not do this: profile_form.SUBMIT_BUTTON_TEXT = translation.ugettext('Save Profile')04:20
madrazryou should instead put04:20
madrazrSUBMIT_BUTTON_TEXT = translation.ugettext('Save Profile')04:20
madrazrin the actual form class04:20
madrazrshikher: ProfileForm04:20
shikhermadrazr: yes. tht was my original thought also. I tried tht as well, self.SUBMIT_BUTTON_TEXT = translation.ugettext('Save Profile')04:24
shikherinside ProfileForm class04:25
shikherinside __init__() funtion04:25
*** rocker has joined #melange04:28
madrazrshikher: and?04:28
shikherno change04:28
*** rocker has joined #melange04:28
shikhermadrazr: also u shud know this, the button value is empty, since I have removed the default value04:29
shikherthe button value when I run it locally, on my profile page04:30
*** rvraghav93_ has joined #melange04:31
*** rvraghav93 has quit IRC04:31
madrazrshikher: Ok, that's what I wanted to know04:32
madrazrshikher: if it was empty04:33
madrazror if it was getting default value from base class04:33
madrazrshikher: thanks, that's useful04:33
madrazrthinking ...04:33
shikhermadrazr: afk for 15 minutes.04:38
*** Gentlecat has joined #melange04:49
madrazrshikher: sure04:51
madrazrI might have left04:51
madrazrI should practice leaving office by 10PM at least  :P04:51
madrazrshikher: but whenever you are back04:51
madrazrshikher: try moving SUBMIT_BUTTON_TEXT to ProfileForm class04:51
madrazrand try again04:52
madrazrshikher: a good friend of mine, who is a Django expert says that should work04:52
madrazrand he says he tried it again to make sure it works04:52
shikhermadrazr: u still there?04:59
shikherhere's the latest- https://code.google.com/r/shikher111-melange-soc/source/detail?r=80f40ffb17c50d18606081a60073779f4dd57209&name=issue_2022_submit_button_value#05:03
tpb<http://ln-s.net/Bcwx> (at code.google.com)05:03
shikherits still empty05:03
*** rvraghav93_ has quit IRC05:07
*** rvraghav93 has joined #melange05:08
madrazrshikher: weirdness05:10
madrazrshikher: suggestion05:11
madrazrshikher: for debugging05:11
shikhermadrazr: for some reason,  the template is not able to get the value of SUBMIT_BUTTON_VALUE05:11
madrazrshikher: put this {{form.SUBMIT_BUTTON_TEXT}}05:12
madrazrsomewhere outside <input > tag05:12
madrazrso that it renders the value05:12
madrazrinstead of making it part of the button05:12
madrazrsee what happens05:12
madrazrshikher: Oh Oh Oh!05:12
madrazrwait!05:12
madrazrshikher: wait wait! Don't do anything05:13
madrazrI should have noticed this before05:13
madrazrshikher: I was not seeing the full template file05:13
madrazrbut just the diff05:13
madrazrshikher: look at the view context method more closely05:14
madrazrshikher: https://code.google.com/r/shikher111-melange-soc/source/browse/app/soc/views/profile.py#24005:15
tpb<http://ln-s.net/Bcyo> (at code.google.com)05:15
madrazrshikher: forms = [user_form, profile_form, notification_form, student_info_form]05:15
shikherforms?05:15
madrazrwe are passing multiple form objects05:15
madrazrshikher: yeah05:15
madrazrand then in the template05:15
shikhermadrazr: yes05:15
shikherI see05:15
madrazrshikher: https://code.google.com/r/shikher111-melange-soc/source/browse/app/soc/templates/modules/gci/form_base.html#3505:16
tpb<http://ln-s.net/Bcys> (at code.google.com)05:16
madrazrwe loop over forms05:16
madrazrfor form in forms05:16
madrazrshikher: your <input> tag is outside the loop05:16
madrazrsince we need only one button for the entire page05:16
madrazrshikher: so what is the value of "form" now?05:16
madrazrshikher: outside the loop?05:16
madrazrshikher: much like, if you run a loop05:16
madrazrfor i in range(1, 10):05:17
madrazrwhat is the value of "i" outside the loop?05:17
madrazrshikher: you see the problem?05:17
shikhermadrazr: yes, I do. good eyes! :)05:17
shikherwhen I move the endfor to end of button </div> tag, i get multiple buttons.05:19
madrazrshikher: yeah05:20
shikhermadrazr: this makes things more complicated, then.05:20
madrazrwhich is why input tag is outside the for loop05:20
madrazr:)05:20
madrazrshikher: I am not that bad a programmer05:21
madrazr:P05:21
madrazrshikher: I wrote that original code :P05:21
madrazrshikher: I did think about it :P05:21
madrazrshikher: indeed05:21
madrazrit is somewhat more complicated05:22
madrazrshikher: do think about it05:22
madrazrI got to run05:22
shikhermadrazr: so, wen shud I expect u bck?05:22
madrazrshikher: to run some errands05:22
madrazrshikher: if I don't feel like going to bed when I go home05:22
shikhermadrazr: I need to discuss the solution wid u, before I implement it.05:23
madrazrI should be around after about 2 hours from now05:23
madrazrotherwise tomorrow morning my time05:23
madrazrshikher: yeah05:23
madrazrwhen I am around here05:23
shikhermadrazr: 2 min?05:23
madrazrshikher: Ok05:23
madrazrexactly 2 mins05:23
shikhermadrazr: thnx05:23
madrazrI will be about in 120 secs from now05:23
shikhermadrazr: since, for every set of forms we hve one submit button05:24
shikhermadrazr: these set of forms are listed in a python list05:24
shikhermadrazr: how about just make it a dictionary with submit value also as part of forms list?05:25
madrazrshikher: +105:26
madrazrgo for it05:26
shikhersince we can rule out the possibility of adding a class scope constant to ModelForms, as tht wud make it for one form only05:26
shikhermadrazr: u better not be saying tht to get rid of me.. :P05:26
madrazrshikher: I am05:26
madrazr:D05:26
madrazrshikher: just kidding05:27
madrazrshikher: I think05:27
madrazrForm class level constant should exist too05:27
madrazrand in case where you pass multiple form objects05:27
madrazryou should pass a dictionary instead of a list05:27
shikhermadrazr: k thts final for now. we can talk later. 2 min's up. thnx!05:27
madrazrshikher: the dictionary value should come from the form object whose meta data you use05:27
shikhermadrazr: k05:28
madrazrshikher: instead of hard coding that string in the context() method05:28
madrazrshikher: you have lot more work to do here05:28
madrazryou are basically going to break all the forms that pass lists05:28
madrazrshikher: also, another warning05:28
madrazrtrying to do anything with GCI to start with right now is a bad idea05:28
madrazrshikher: these changes should go to GCI too05:29
jasvirmadrazr: I need some help.05:29
madrazrbut I recommend not to start with it05:29
madrazrjasvir: sorry05:29
madrazrI had to run like 6 mins back05:29
shikhermadrazr: all points noted.05:29
jasvirmadrazr: Oh!05:29
madrazrjasvir: just extended it to finish the discussion we were having from a long time with shikher05:29
madrazrjasvir: will try to come back online after I go home05:29
jasvirmadrazr: Ok05:29
madrazrjasvir: I need to go to stores which close at 1105:29
madrazrjasvir: 30 mins I have05:30
madrazr:P05:30
madrazrshikher: the reason for that is05:30
madrazrshikher: GCI is badly broken at the moment due to NDB migration05:30
madrazrso if you run into problems05:30
madrazrit is hard to figure out if it is due to migration brokenness05:30
madrazror a genuine problems you are facing due to form changes05:30
shikhermadrazr: ok.05:31
madrazrshikher: so please start with GSoC forms05:31
madrazrjasvir: I am really sorry about that though05:31
madrazrjasvir: I will try to be back in 2 hours though05:32
jasvirmadrazr: It's ok. I'll wait.05:32
madrazrjasvir: thanks05:32
madrazrsee you all05:32
jasvirmadrazr: :)05:32
*** madrazr has quit IRC05:33
*** Niharika has quit IRC05:38
*** Niharika has joined #melange05:39
*** rvraghav93 has quit IRC05:40
*** Niharika has quit IRC05:44
*** samgtr has quit IRC05:45
*** Niharika has joined #melange05:45
*** rvraghav93 has joined #melange05:47
*** Niharika has quit IRC05:49
*** jasvir has quit IRC05:59
*** variable has joined #melange06:00
*** jasvir has joined #melange06:03
*** rvraghav93 has quit IRC06:14
*** rvraghav93 has joined #melange06:18
*** Gentlecat has quit IRC06:21
*** Gentlecat has joined #melange06:25
*** rusnic has joined #melange06:25
*** jasvir has left #melange06:26
*** rusnic has quit IRC06:33
*** jasvir has joined #melange06:39
*** rvraghav93_ has joined #melange06:45
*** rvraghav93 has quit IRC06:45
*** rusnic has joined #melange07:27
*** rusnic has quit IRC07:37
*** Niharika has joined #melange07:41
*** madrazr has joined #melange07:45
*** ChanServ sets mode: +o madrazr07:45
*** monkegjinni has joined #melange07:47
*** rvraghav93_ has quit IRC07:50
*** monkegjinni has quit IRC07:51
*** monkegjinni has joined #melange07:52
madrazrshikher: jasvir: ping07:53
madrazrjasvir: you had a question07:54
madrazrshikher: any luck?07:54
*** shikher has quit IRC07:55
*** monkegjinni has quit IRC07:56
*** rocker has quit IRC07:58
jasvirmadrazr: Yeah.07:59
jasvirmadrazr: Just making a last try.07:59
jasvirmadrazr: It'll take just 4 min.08:00
*** shikher has joined #melange08:03
shikhermadrazr: hey. bck from class now. r u awake for some more time?08:04
madrazrshikher: will be around for 30 mins for sure08:05
madrazrnot sure about after that08:05
madrazrjasvir: Oh ok08:05
madrazrsure08:05
shikhermadrazr: gud enough. so, continuing from where we left our discussion.08:06
shikhermadrazr: dictionaries, right?08:06
shikhermadrazr: can u elaborate on this..."the dictionary value should come from the form object whose meta data you use".08:07
jasvirmadrazr: It's working.08:10
jasvirmadrazr: Done with updation.08:10
jasvirmadrazr: :D08:10
madrazrshikher: something like08:10
madrazr{08:11
madrazr   'forms': [form1, form2, form3],08:11
madrazr   'metadata_form': form2,08:11
madrazr}08:11
madrazror08:11
*** rocker has joined #melange08:12
madrazr{08:12
madrazr    'forms': [form1, form2, form3],08:12
madrazr    'SUBMIT_BUTTON_TEXT': form2.SUBMIT_BUTTON_TEXT,08:12
madrazr}08:12
madrazrshikher: one of the two08:12
madrazrshikher: I am also wondering about an alternative solution now08:13
madrazrnot sure which one is better (still)08:13
shikhermadrazr: how do i reference SUBMIT_BUTTON_TEXT in the template?08:13
madrazrshikher: may be we should throw away the funky feature of passing the list of forms08:14
madrazrand individually render the forms?08:14
madrazrby passing08:14
madrazruser_from08:14
madrazrprofile_form08:14
madrazrstudent_form08:14
madrazrseparately?08:14
shikhereach form separately...cool...since there are not many such cases!08:14
madrazrI am divided between both the approaches08:14
madrazrcan't decide which is better08:14
madrazrshikher: yeah08:14
madrazrI think profiles is the only case?08:15
madrazrno?08:15
madrazrI can't think of any other form where we do this08:15
*** suranga has quit IRC08:15
madrazrshikher: about referencing08:15
madrazrif you choose08:15
madrazrform_data = {08:16
madrazr    'forms': [form1, form2, form3],08:16
madrazr    'metadata_form': form2,08:16
madrazr    }08:16
madrazrin the template you will do08:16
shikherI see 3 cases...profile.py , gci/admin.py , gsoc/admin.py whre we r sending multiple forms08:16
madrazr<input value="{{ form_data.metadata_form }}" ...>08:17
madrazrif you choose the other dictionary structure08:17
madrazryou will do08:17
madrazr<input value="{{ form_data.SUBMIT_BUTTON_TEXT }}" ...>08:17
madrazroops correction about the first one08:17
madrazrit should be08:17
madrazr<input value="{{ form_data.metadata_form.SUBMIT_BUTTON_TEXT }}" ...>08:18
madrazradmin.py?08:18
madrazrreally!?08:18
shikhermadrazr: nvm its only profile...i think. please continue with ur description.08:18
madrazrwhich class?08:18
madrazrlink me to the code?08:18
madrazrshikher: Ok08:18
madrazrshikher: yeah that's all08:18
madrazrI am done08:18
madrazrread above08:18
madrazrsplitting the forms list might be a reasonable solution I think08:19
madrazrshikher: spend some time thinking about it08:19
madrazrshikher: about the two approaches08:19
madrazrI am leaning towards splitting08:19
madrazrthan dictionary08:19
madrazrbut I am not fully convinced yet08:19
madrazrshikher: so do think about it08:19
shikhermadrazr: but if we split, we will have to change tht specific template also.08:21
madrazrshikher: yeah08:21
madrazrdefinitely08:21
madrazrshikher: but that also makes things more explicit08:21
*** burcin has joined #melange08:23
shikhermadrazr: but tht requires unnecessary coding, if we ever see tht case again.08:23
madrazrshikher: as in?08:23
shikhermadrazr: I think not splitting and using tht form_data wud be the best combo.08:24
*** Niharika has quit IRC08:24
shikherdefining explicit form.render for each form in the template, which we wont have to do in case of 'not splitting'08:24
shikhermadrazr: also, how shud I pass the value of form_data? separately in context, as it can not be part of the ModelForm class.08:31
madrazrjasvir: updating what, what, what?08:40
madrazrsing along08:40
madrazrwhat, what, what? :P08:40
madrazrshikher: tinyMCE 4.12 is running now? :P08:41
jasvirmadrazr: Yes08:41
jasvirmadrazr: It's wotking08:41
madrazr4.0.20 I guess08:41
madrazrsorry08:41
madrazrnot sure where I got the 4.12 number from08:41
madrazr:P08:41
jasvirmadrazr: 4.0.3008:41
jasviroops08:41
madrazrwait08:41
jasvirmadrazr: 20*08:41
madrazrthat's the latest?08:41
madrazrah Ok08:41
* madrazr high fives jasvir08:42
madrazrjasvir: thanks!08:42
madrazrjasvir: send the update08:42
jasvirmadrazr: :D08:42
madrazrjasvir: I mean commit08:42
madrazrjasvir: ping both Mario and me for reviews08:42
madrazrjasvir: and add Nathaniel too08:42
jasvirmadrazr: ok.08:42
jasvirmadrazr: I am working on it. I am updating it on my testing instance so that you all can see it in action.08:43
*** Niharika has joined #melange08:43
jasvirmadrazr: Just removing unwanted menu buttons.08:43
madrazrshikher: if you are going the dictionary way, yes form_data should be in context08:44
madrazrit is something that contains forms08:44
jasvirmadrazr: and adding required buttons.08:44
madrazrshikher: about your comment "defining explicit form.render for each form in the template, which we wont have to do in case of 'not splitting'"08:44
madrazrshikher: it is not too much of work08:45
madrazras we just noticed08:45
madrazrit is only for two forms we need to change08:45
madrazrshikher: but on the other hand, we will fall in line with Python's philosophy08:45
madrazr"Explicit is better than implicit:08:45
madrazr"Explicit is better than implicit"08:45
shikhermadrazr: well then shud we not just pass the button_value in the context directly...to be more explicit..rather than making a class scope constant?08:48
madrazrshikher: that's not really an explicit vs implicit argument08:48
madrazrshikher: scoping the variable one way or the other08:48
madrazris not really an explicit vs. implicit argument08:48
madrazrit is just about how you are scoping it08:48
madrazrshikher: also Daniel explained to you in that semi-centi-thread why passing the button text in the context dictionary is a bad idea08:49
shikhermadrazr: yes...I was just putting an argument for explicit vs implicit08:50
*** rocker has quit IRC08:55
*** shikher has quit IRC09:01
*** shikher has joined #melange09:01
shikhermadrazr: also form_data will be declared in the context function, right?09:02
*** rocker has joined #melange09:22
shikhermadrazr: So, if we do split, it seems gud. I will move the 'endfor' to end of button div tag for single forms. and use dictionary with form_data in case of multiple forms...wat say?09:40
*** Niharika has quit IRC09:41
madrazrshikher: I am not sure I understand your approach09:43
shikhermadrazr: I hve declared a class scope constant in forms base class09:44
shikheras for the forms_base template, I have changed the input button field to be inside the for loop of forms.09:45
shikherNow, in templates with multiple forms, I will be passing a dictionary known as form_data which I will use to render forms, and I will change that block in the template to move the input button field outside the for loop09:47
shikherso we only have one button09:47
*** Darrel has quit IRC09:48
*** Darrel has joined #melange09:48
*** robbyoconnor has quit IRC09:49
*** robbyoconnor has joined #melange09:49
madrazrshikher: input button has always been outside the for loop09:52
madrazrisn't it?09:52
madrazrexcept when you changed now for your testin09:52
madrazr*testing09:52
*** rocker has quit IRC10:01
jasvirmadrazr: Please have a look at testing instance10:03
jasvirmadrazr: http://my-melange.appspot.com10:03
tpbTitle: Welcome to Melange (at my-melange.appspot.com)10:03
jasvirmadrazr: try submitting proposal.10:03
*** Gentlecat has quit IRC10:03
*** Gentlecat has joined #melange10:05
shikhermadrazr: I am putting it inside the for loop now, because with the exception of one form, all 'forms' variable contain only one form.10:06
*** joshwambua has quit IRC10:12
*** monkegjinni has joined #melange10:17
*** robbyoconnor has quit IRC10:19
*** robbyoconnor has joined #melange10:20
*** joshwambua has joined #melange10:23
madrazrshikher: wait, what!?10:25
madrazrshikher: please show me the code10:25
madrazrshikher: the code you write10:25
madrazrshikher: so that I can give useful feedback10:25
madrazrjasvir: OMG!10:29
madrazrOMG!10:29
madrazrOMG!10:29
jasvirmadrazr: What happen?10:29
shikhermadrazr: https://code.google.com/r/shikher111-melange-soc/source/detail?r=1897e9d154a9ffb61060d3f618c4a84d10fd3d6d&name=issue_2022_submit_button_value10:34
tpbTitle: 1897e9d154a9 - shikher111-melange-soc - Melange SOC clone - Main - Google Project Hosting (at code.google.com)10:34
*** ariz has joined #melange10:35
jasvirmadrazr: ?10:35
madrazrjasvir: my excitement10:35
madrazrseeing this new version10:35
jasvirmadrazr: Oh. Thank god.10:35
madrazrjasvir: one small nitpick10:36
jasvirmadrazr: I thought that there is something wrong.10:36
madrazrjasvir: you need to remove that "p" at the bottom10:36
jasvirmadrazr: Ok.10:36
madrazrjasvir: or is it something else?10:36
madrazrjasvir: it is clickable10:36
madrazrnot sure what it is though10:36
madrazrjasvir: no no, don't be scared10:36
madrazrnothing wrong10:36
madrazrthat was my excitement about this new shiny thing10:36
jasvirmadrazr: It is tag of html source.10:36
madrazrjasvir: Oh ok10:37
madrazrjasvir: removable right?10:37
jasvirmadrazr: let me c10:37
jasvirmadrazr: Rest is fine?10:37
madrazrjasvir: looks good to me10:39
jasvirmadrazr: Ok10:40
jasvirmadrazr: Sounds good10:40
jasvirmadrazr: Feels good10:40
shikhermadrazr: this is tinyMCE ? wow...major improvement!!10:41
madrazrall hail jasvir :)10:41
shikherjasvir: only if we had this before the proposal deadline. lot of students cud hve benefitted frm this. Great catch!10:42
jasvirmadrazr: all hails Madhu. For motivation. Thanks10:42
jasvirshikher: In GCI ;)10:43
madrazrjasvir: you are welcome10:43
madrazrjasvir: yeah, we can use for GCI10:44
madrazrif that happens10:44
madrazrjasvir: or next GSoC if that happens10:44
madrazrwhichever is the next program that happens10:44
madrazrwe will use this10:44
jasvirmadrazr: cool!! ;)10:45
shikhermadrazr:  https://code.google.com/r/shikher111-melange-soc/source/detail?r=1897e9d154a9ffb61060d3f618c4a84d10f10:46
tpbTitle: 1897e9d154a9 - shikher111-melange-soc - Melange SOC clone - Main - Google Project Hosting (at code.google.com)10:46
jasvirmadrazr: That "p" seems like new feature.10:46
madrazrshikher: Oh sorry10:46
madrazrlet me take a look10:46
jasvirmadrazr: And not romavable.10:46
jasvirmadrazr: I made a try by removing plugins one by one. But no effect on it.10:47
madrazrjasvir: we need to look it up10:48
madrazrit is going to cause some pain10:48
madrazrjasvir: with students asking what is it expected to do10:48
jasvirmadrazr: I'll ask this on tinyMCE forum.10:49
madrazrjasvir: yeah, cool!10:49
madrazrshikher: I am not sure how this works10:50
madrazrshikher: does this?10:50
shikhermadrazr: yes.10:50
shikhermadrazr: http://postimg.org/image/yyvqnfafn/10:51
tpbTitle: View image: Screenshot from 2014 03 27 14 20 52 (at postimg.org)10:52
madrazrshikher: and why doesn't this render 3 buttons for profile?10:52
shikhermadrazr: this change is only for summerofcode directory. For profile, the template content block will be different.10:52
*** monkegji_ has joined #melange10:52
ollywow, tinymce has evolved a bit10:53
*** monkegjinni has quit IRC10:53
ollyhas someone suggested that the confirmation for submitting enrollment should have a button to submit a proposal?10:53
shikhermadrazr: tht profile was for GCI.10:54
madrazrolly: also the rumor mill says that html <-> WYSIWYG is somewhat easier10:54
*** Gentlecat_ has joined #melange10:54
ollyit'd be nice if it mangled less10:54
madrazrolly: you mean link to the proposal submission page?10:54
ollyyeah10:54
madrazrolly: there is a patch for it submitted by one of our prospective students10:54
ollyi bet most students who just submitted their enrollment form will then want to start a proposal10:54
madrazrsomewhere in the patch queue10:55
ollyok, cool10:55
madrazrolly: yeah10:56
madrazrshikher: irrespective of that10:57
madrazrshikher: <input> should not be inside a for loop10:57
madrazrshikher: it is only a side effect of that view that you only see one button10:57
madrazrif someone decides to write a view that passes multiple form objects10:58
madrazrthey will start seeing multiple buttons10:58
*** Gentlecat has quit IRC10:58
shikhermadrazr: u hve not been listening to me. :)10:58
madrazrshikher: what did I miss?10:58
shikhermadrazr: This is only for single forms only.10:59
madrazrshikher: what is a single form?10:59
shikhermadrazr: single form objects10:59
madrazrshikher: what does that mean?10:59
madrazrshikher: all form objects are single10:59
shikhermadrazr: passing single form object, not multiple11:00
madrazrshikher: as Nathaniel keeps mentioning, this is one of the biggest problems about inheritance11:00
shikherfor multiple forms, I will define a content block in that template11:01
madrazrshikher: once you expose a public method (in this case that is a Django template)11:01
madrazryou cannot control how the inherited classes will override it11:01
madrazrshikher: once you create this form_base.html11:01
madrazrin this way11:01
madrazrit stops nobody to inherit this template11:01
madrazrand pass on multiple form objects11:02
madrazrand then they are screwed11:02
shikhermadrazr: well as we were talking about explicity before, we wud need a new template for tht anyways11:02
madrazrshikher: you are intentionally setting them up for a trap11:02
madrazrshikher: correct11:02
madrazrbut that does not make the existing template buggy11:02
madrazrshikher: esp. the one that is a very base template11:03
madrazrand can be inherited by anyone11:03
madrazrshikher: please think about it11:04
shikhermadrazr: but we won't use tht template for multiple forms anyways, which is the only case where the trap is set. so not really a trap!11:04
madrazrany argument you are going to make11:04
madrazrrendering buttons multiple times in a for loop is wrong11:04
madrazrunless you are going to do some black magic from behind to make sure the Python lists always have only one item in it11:04
madrazr*in them11:04
madrazrshikher: the trap is set and not really a trap?11:05
madrazrhow do they go along so well?11:05
madrazrshikher: the argument of we won't use that template anyway, so we are going to make it buggy and leave it there11:06
madrazrso that others can use it and inherit the bug11:06
madrazris not even an argument11:06
shikhermadrazr: ok. how about I check if forms_data exist, and if it does I use a different content block?11:06
madrazrshikher: don't do any of those11:06
madrazrwith this discussion11:06
madrazrand seeing how easy it is for others to make this mistake11:06
madrazrI am now starting to feel strongly about splitting11:07
shikhermadrazr: a simple if else condition.11:07
madrazrshikher: just make the profile form explicit11:07
madrazrshikher: no need11:07
madrazrjust make the forms explicit11:07
madrazrshikher: I am becoming increasingly convinced that we should just make the form objects rendering explicit11:07
madrazrshikher: this multiple button within the for loop will arise sometime in the future11:08
madrazrif we leave this thing as is11:08
madrazrshikher: let's not make that happen11:08
shikhermadrazr: sure.11:08
madrazrmake the form objects explicit11:08
shikhermadrazr: explicit it is.11:08
madrazrshikher: go for it11:08
madrazrshikher: I will go to bed now11:09
madrazr:P11:09
shikhermadrazr: one more thing11:09
madrazryeah?11:09
shikhermadrazr: I will not be using dictionaries for  passing single form object11:09
madrazrjasvir: btw, when you email the ML for the code review11:10
madrazrdon't forget to CC Mario, Nathaniel and me11:10
madrazrjasvir: also attach screenshots11:10
madrazrjasvir: not sure everyone will have time to create accounts11:10
madrazrupload enrollment form etc.11:10
madrazrshikher: correct11:11
madrazrshikher: you will instead directly put them in context dictionary11:11
jasvirmadrazr: code is ready. Just searching tinyMCE form for removing that tag.11:11
shikhermadrazr: yes. as is being done already.11:11
shikhermadrazr: also do u want me to change forms -> form?11:12
shikhersince we r going to remove the for loop11:12
madrazrshikher: yeah11:14
madrazrsingle form should be singular11:15
madrazrnot plural11:15
madrazrshikher: don't remove the for loop11:15
madrazrshikher: leave the base form as it is11:15
madrazrdon't change it11:15
madrazrcreate a separate form for profiles11:15
madrazrOh wait11:15
shikhermadrazr: wat?11:15
madrazrshikher: you still have to change base form11:15
madrazrto support only single form11:16
shikhermadrazr: yeah11:16
madrazrshikher: sure11:16
madrazrgo for it11:16
madrazrshikher: I need to discuss further about it11:16
madrazrbut I have no patience now11:16
madrazrI am dropping11:16
madrazrI need to crash now11:16
shikhermadrazr: thnx for all ur help. have a gud night!11:16
madrazralright see you11:16
madrazrgood work jasvir shikher both of you11:17
*** madrazr has quit IRC11:17
* jasvir : thanks Madhu :)11:18
*** rusnic has joined #melange11:19
*** samgtr has joined #melange11:22
*** monkegji_ has quit IRC11:28
*** monkegjinni has joined #melange11:29
*** monkegjinni has quit IRC11:33
*** raghunayyar has joined #melange11:33
*** sidthekid has quit IRC11:49
*** rusnic has quit IRC11:49
*** rusnic has joined #melange12:04
*** jasvir has left #melange12:08
*** rocker has joined #melange12:10
*** rusnic has joined #melange12:11
*** ariz has quit IRC12:16
*** sidthekid has joined #melange12:17
*** Niharika has joined #melange12:19
*** robbyoconnor has quit IRC12:22
*** Gentlecat_ has quit IRC12:22
*** robbyoconnor has joined #melange12:23
*** rvraghav93 has joined #melange12:26
*** suranga has joined #melange12:34
*** bitgeeky has joined #melange12:43
*** rusnic has quit IRC12:47
*** rvraghav93_ has joined #melange12:47
*** rvraghav93 has quit IRC12:48
*** robbyoconnor has quit IRC12:59
*** robbyoconnor has joined #melange12:59
*** kdh-1334 has joined #melange13:16
*** kdh-1334_____ has joined #melange13:16
*** monkegjinni has joined #melange13:33
*** robbyoconnor has quit IRC13:33
*** jasvir has joined #melange13:33
*** robbyoconnor has joined #melange13:34
*** maxday has quit IRC13:35
*** rvraghav93_ has quit IRC13:37
*** shikher has quit IRC13:38
*** monkegjinni has quit IRC13:41
*** monkegjinni has joined #melange13:42
*** rvraghav93 has joined #melange13:45
*** monkegjinni has quit IRC13:46
*** rvraghav93 has quit IRC13:58
*** rvraghav93 has joined #melange14:01
*** rishabh has joined #melange14:05
*** BlankVerse has joined #melange14:13
*** SinnerShanky has joined #melange14:20
*** SinnerShanky has quit IRC14:24
*** monkegjinni has joined #melange14:40
*** raghunayyar has quit IRC15:07
*** ashishk has joined #melange15:23
*** rvraghav93 has quit IRC15:44
*** rvraghav93 has joined #melange15:45
*** raghunayyar has joined #melange15:46
*** monkegjinni has quit IRC16:05
*** monkegjinni has joined #melange16:06
*** monkegjinni has quit IRC16:10
*** ashishk has quit IRC16:19
*** ashishk has joined #melange16:22
*** hammad_ has joined #melange16:37
*** Niharika has quit IRC17:02
*** bitgeeky has joined #melange17:03
*** ashishk has quit IRC17:10
*** bitgeeky has quit IRC17:15
*** kdh-1334 has quit IRC17:30
*** kdh-1334_____ has quit IRC17:30
*** kdh-1334_____ has joined #melange17:31
*** kdh-1334 has joined #melange17:31
*** jasvir has left #melange17:46
*** burcin has quit IRC17:50
*** asmeurer has joined #melange18:00
*** robbyoconnor has quit IRC18:07
*** robbyoconnor has joined #melange18:07
*** monkegjinni has joined #melange18:21
*** rishy has joined #melange18:22
*** asmeurer has quit IRC18:26
*** robbyoconnor has quit IRC18:31
*** robbyoconnor has joined #melange18:34
*** robbyoconnor has quit IRC18:38
*** monkegji_ has joined #melange18:38
*** robbyoconnor has joined #melange18:39
*** monkegjinni has quit IRC18:40
*** bitgeeky has joined #melange19:03
*** madrazr has joined #melange19:06
*** ChanServ sets mode: +o madrazr19:06
*** bitgeeky has quit IRC19:45
*** rishabh has quit IRC19:49
*** robbyoconnor has quit IRC20:11
*** kdh-1334 has quit IRC20:15
*** kdh-1334_____ has quit IRC20:15
*** kdh-1334_____ has joined #melange20:15
*** paradoq has joined #melange20:15
*** kdh-1334 has joined #melange20:15
*** rihbyne has joined #melange20:22
*** sidthekid has quit IRC20:23
*** sidthekid has joined #melange20:27
*** rihbyne has quit IRC20:28
*** rihbyne has joined #melange20:28
*** rbyne has joined #melange20:33
*** rihbyne has quit IRC20:34
*** rbyne has quit IRC20:36
*** bitgeeky has joined #melange20:37
*** kdh-1334_____ has quit IRC20:38
*** kdh-1334 has quit IRC20:38
*** kdh-1334 has joined #melange20:38
*** kdh-1334_____ has joined #melange20:39
*** rbyne has joined #melange20:39
*** sidthekid has quit IRC20:40
*** kdh-1334_____ has quit IRC20:43
*** kdh-1334 has quit IRC20:43
*** rbyne has quit IRC20:44
*** Gentlecat has joined #melange20:44
*** rbyne has joined #melange20:46
*** rbyne has quit IRC20:48
*** hammad_ has quit IRC20:49
*** mang0 has joined #melange20:54
*** mang0 has joined #melange20:54
*** kdh-1334_____ has joined #melange21:20
*** kdh-1334 has joined #melange21:20
*** bitgeeky has quit IRC21:23
*** paradoq has quit IRC21:37
*** rvraghav93_ has joined #melange21:46
*** rvraghav93 has quit IRC21:47
*** kdh-1334 has quit IRC21:56
*** kdh-1334_____ has quit IRC21:56
*** raghunayyar has quit IRC22:07
*** monkegji_ has quit IRC22:09
*** monkegjinni has joined #melange22:10
*** monkegjinni has quit IRC22:14
*** sidthekid has joined #melange22:17
*** joshwambua has quit IRC22:33
*** joshwambua has joined #melange22:33
*** sidthekid has quit IRC22:38
*** sidthekid has joined #melange23:08
*** ashishk has joined #melange23:13
ashishkmadrazr: ping23:13
madrazrashishk: pong23:14
madrazrbad timing though23:14
madrazrashishk: I will be out for a meeting in about 5 mins from now23:14
*** samgtr has quit IRC23:15
ashishkmadrazr: It's ok ,I  will talk to u later :)23:15
madrazrashishk: cool, thanks23:15
*** rishy has quit IRC23:17
*** afanfa has joined #melange23:23
afanfaHello everyone23:24
afanfaIs anybody of the Melange staff ?23:25
madrazrafanfa: I am here23:25
madrazrbut I won't be actively replying for about 1.5 hours at least23:25
*** monkegjinni has joined #melange23:25
madrazrif you type in your question(s)23:25
madrazrI should be able to reply in 1.5 hours23:25
afanfaOk, I will contact you later, thank you23:26
*** afanfa has quit IRC23:27
*** kdh-1334_____ has joined #melange23:34
*** kdh-1334 has joined #melange23:34
*** rvraghav93_ has quit IRC23:35
*** asmeurer__ has joined #melange23:35
*** rvraghav93 has joined #melange23:36
*** rvraghav93_ has joined #melange23:41
*** rvraghav93 has quit IRC23:42
*** monkegjinni has quit IRC23:45
*** monkegjinni has joined #melange23:45
*** sidthekid has quit IRC23:47
*** Gentlecat has quit IRC23:48
*** rvraghav93 has joined #melange23:51
*** monkegjinni has quit IRC23:51
*** rvraghav93_ has quit IRC23:51
*** asmeurer__ has quit IRC23:57
*** rvraghav93_ has joined #melange23:58
*** rvraghav93 has quit IRC23:59

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