Sunday, 2009-01-25

*** tpb has joined #melange00:00
*** bhy has joined #melange00:21
*** penyaskito has quit IRC01:46
*** dmitrig01|afk has quit IRC01:58
*** dmitrig01|afk has joined #melange01:58
*** ChanServ sets mode: +v dmitrig01|afk01:58
*** dmitrig01|afk has quit IRC03:14
*** dmitrig01_ has joined #melange03:14
*** ChanServ sets mode: +v dmitrig01_03:14
*** dmitrig01_ has quit IRC03:21
*** Lennie has joined #melange03:58
*** ChanServ sets mode: +v Lennie03:58
*** solydzajs has joined #melange04:08
*** ChanServ sets mode: +o solydzajs04:08
*** Lennie has quit IRC04:56
*** SRabbelier has joined #melange05:25
*** ChanServ sets mode: +v SRabbelier05:25
SRabbelierno_mind: dude06:19
SRabbelierno_mind: sorry I typoed your name on the ML :P06:19
SRabbelierno_mind: I thought it was 'no_name' :(06:19
bhyhi guys, happy Chinese New Year! :)06:22
SRabbelierbhy: indeed :)06:27
*** Lennie has joined #melange06:45
*** ChanServ sets mode: +v Lennie06:45
SRabbelierno_mind: ping? :)07:01
*** mithro has joined #melange07:14
*** ChanServ sets mode: +v mithro07:14
*** penyaskito has joined #melange07:23
no_mindSRabbelier, I was away07:39
no_mindtell me07:39
no_mindSRabbelier, ping me when you come back, I need to ask something07:44
*** no_mind has quit IRC07:54
*** no_mind has joined #melange07:55
Lenniehi no_mind07:59
no_mindhey Lennie08:00
Lenniewassup :D?08:02
SRabbelierno_mind: heya08:02
LennieSRabbelier should be here soonish :p08:02
Lennienm ^_ ^08:02
SRabbelierI'm just that fast08:02
LennieI'm back to clubs and stuff08:02
SRabbelierno_mind: you still there? :)08:02
Lennieyou guys have fun with JSON :D08:02
no_mindSRabbelier, hi08:02
SRabbelierno_mind: did you see my last commit?08:03
no_mindSRabbelier, while you fix the JSON issu if you can point me to view/template I need to change, I can start the work. I can right now pull data from a file and when view is stable, tell you the final structure of JSON object required08:03
no_mindSRabbelier, saw your last message on ML but not the last commit08:04
* no_mind prepares to svn update08:04
SRabbelierno_mind: JSON is working :)08:04
no_mindokies kool08:04
SRabbelierno_mind: you can go do /user/pick.... and it will give yo ua JSON object08:04
no_mindonce I get this working, I will implement a search with autocomplete to search users from the user list08:05
SRabbelierno_mind: cool :)08:05
SRabbelierno_mind: that would be awesome08:05
no_mindSRabbelier, any idea which template I need to change, Since this is first time, i will need some hand holding in where to make changes08:05
SRabbelierno_mind: that's np08:06
SRabbelierno_mind: the edit.html file is where the as_table call is made (which generates the link)08:06
SRabbelierno_mind: but you'll want to edit the as_table template08:06
SRabbelierno_mind: look at _as_table_row.html08:06
SRabbelierno_mind: note the '  {% if select_url %}' part08:07
no_mindI think, I should make a widget first, then we can integrate the widget in the club application template or where ever we want to allow user list selection08:07
no_mindwhat you guys say ?08:07
SRabbelierno_mind: fine with me, I figured you'd need a page to test your widget on, but go ahead :)08:08
Lenniethat user list selection thing08:10
Lenniecan you fill in some letter so it filters?08:11
Lennietbh I dont think we want that08:11
Lenniethere will be 1000+ entities in there :S08:11
Lenniedocument selction would be a better place to start?08:11
no_mindLennie, yup, thats why I said, once widget is working I will implement a autocomplete search on top of the user list08:11
no_mindLennie, so when you type first 3 letters of a name it will filter out all the names matching criteria08:12
LennieI wonder how it will work with a lot of user entities ^_ ^08:12
no_mindlets see08:12
Lenniewe'll cache them anyway :P08:12
Lennieand if you cant find a new user you probably have to type it in anway08:13
Lenniewe can put a text in there like08:13
Lenniethis list is refreshed every day08:13
Lennieor every hour08:13
Lennie^_ ^08:13
Lenniego ahead :P08:13
no_mindand if this becomes a bottleneck, we can always fall back to first alphabet link08:13
LennieI'm just trying to make sure we thought about it :D08:13
no_mindor if user types in the full name, you will find the direct entry or all matching entries08:13
Lenniethat's why I'm randomnly spawning whine ^_ ^08:14
no_mindif you cant fins a user, you can type in the full name and hit search08:14
Lenniethat would be awesome :D08:14
*** Merio has joined #melange08:41
*** mithro has quit IRC09:22
LennieIs Haoyu Bai here on IRC?10:04
*** tanoku has joined #melange10:23
*** johndbritton has joined #melange10:25
*** shiyee has joined #melange10:31
*** johndbritton_ has quit IRC10:41
SRabbelierLennie: that would be bhy10:46
SRabbelierno_mind: how's the widget going?10:46
no_mindnot started working yet... will start in few hours10:46
no_mindits a holiday in .in tomorrow so I have lots of time, just coding with leisure10:47
LennieI almost have a week of from uni so I'm also coding all the way :P10:47
no_mindwell you are in a uni and I am in a corp, that too the one I own... so life is not as happy as yours...10:48
SRabbelierno_mind: fair enough :)10:53
*** Merio has quit IRC11:08
*** Merio has joined #melange11:10
*** Lennie is now known as Lennie|Gone11:50
*** penyaskito has quit IRC12:09
*** dmitrig01|afk has joined #melange12:14
*** ChanServ sets mode: +v dmitrig01|afk12:14
*** bhy has quit IRC12:46
*** Merio has quit IRC14:21
*** penyaskito has joined #melange14:40
*** Merio has joined #melange14:52
*** johndbritton_ has joined #melange14:55
*** Lennie|Gone is now known as Lennie14:59
*** johndbritton has quit IRC15:10
Meriosolydzajs: new JS file updated in issue 13715:17
solydzajsok will have a look15:17
solydzajsMerio: what next would you like to work on ?15:17
Meriosolydzajs: If there is something in Javascript, otherwise I'll be working on the on/off switch15:18
solydzajsMerio: I would suggest on/off switch for now and I will find some JS work for you after that, how does that sound ?15:20
Meriosolydzajs: that's ok for me :)15:21
Meriosolydzajs: As I've changed those .py files in my GMap diff before reading anything about python (and obviously about the style guides ;)) be care that probably some indentation has been done with tabs instead of spaces15:21
solydzajsMerio: I will fix it no worries :-)15:22
Meriosolydzajs: ok thanks :)15:22
Lenniesolydzajs is code review king :P15:23
LennieThere's almost no dot he'll miss :D15:23
*** no_mind has quit IRC15:23
LennieI write well documented code but I'm sometimes sloppy in style :(15:23
*** no_mind has joined #melange15:42
*** dmitrig01|afk has quit IRC16:11
*** gloob has joined #melange16:13
* SRabbelier hoards the new contributors16:31
SRabbelierkeep bringin' 'em! :D16:32
*** Merio has quit IRC16:32
no_mindSRabbelier, you scared away Merio :p16:32
Lennieso anyhow16:32
Lennieveelck is doing the view in which a host can be kicked :D16:33
Lenniehis first step would be to define a new pattern in the django_extra_patterns parameter16:33
Lenniein soc/views/models/host.py16:34
SRabbelierno_mind: hehe, he made pawel go away yesterday by putting his hands up16:34
LennieSRabbelier: fresh meat :D16:34
Lenniethat's the recap :p16:35
Lennieveelck: how is it goign :D16:35
veelckLennie: it's ok, just have some problems with iterm ;-)16:35
SRabbelierveelck: iterm?16:36
veelckthat's whym I'm not very responding ;-)16:36
SRabbelieris that the apple term? iTerm? :P16:37
Lenniek :D16:37
veelckyep ;-)16:37
Lenniejust lemme know once you have the pattern in place16:37
SRabbelieryou can easily check that by going to localhost:8080/foobar16:38
SRabbelierand then look in the list of patterns it tried :)16:38
Lennieand I can redirect you to the rights you should set and how to 'activate' your new method so that you can start some real coding16:38
LennieSRabbelier, that manage view16:38
Lennieshould just be like a button that says remove and cancel right?16:38
Lennieno need for anything fancy atm?16:39
veelckok :)16:39
veelckI know what you're going to do ;-)16:39
*** veelck_ has joined #melange16:40
veelck_lets try here ;-)16:40
veelck_dunno why it doesn't want to update my screen in iterm - i have to click on it every time to get it updated16:41
veelck_sorry, I have some problem with getting my working copy started16:50
* veelck_ lame16:50
veelck_I have to set new pattern for extra_django_patterns16:52
Lenniein soc/models/views/host.py16:52
Lennieswap models and views :P16:53
veelck_ok, are there params extra_django_patterns ? don't see those ;-)16:53
veelck_or you meant from the beginning that I should add the line as it was in, and I'm completly acting like a mooron ;-)16:55
veelck_Lennie: you meant that, didn't you ? ;-)16:55
Lennieyeah you can just such a line to host.py16:56
Lenniethe base class will turn it into an url pattern that django can then match :)-16:56
veelck_due to this nice regexp thing :)16:57
Lenniecan I see it :D?16:59
Lennieor better yet16:59
Lenniedo you have melange running?16:59
veelckbut i'd like to check if it's like it supposed to be ;-)17:00
veelckmaybe some tip ? I have created an account in google app engine17:00
veelckand had it uploaded some time ago17:00
veelckbut don't remember how i did that ;-)17:00
*** dmitrig01|afk has joined #melange17:01
*** ChanServ sets mode: +v dmitrig01|afk17:01
Lennieyou can run it locally on your own pc as well17:01
veelckPawel started some nice script thing and it did the shit17:01
tpb<> (at
Lennieyou can read about that there17:01
*** madrazr has joined #melange17:01
LennieSRabbelier, can help you with the script as I'm bound to Windows and cannot use it :P17:01
Lenniebut you can also run melange locally without having to use the script to upload all the files to appengine17:01
Lenniewhich is better17:02
Lenniebecause you can see more debug information17:02
veelckokey, I'll try to do so :)17:02
Lenniethe wiki page should help you17:05
Lennietogether with the appengine page :)17:05
tpb<> (at
veelckyep, I started appengine uisng /thirdparty/.....17:06
veelckbut I get some exception on startin ;-)17:06
SRabbelieram here now :)17:06
veelck/Users/veelck/Melange/thirdparty/google_appengine/google/appengine/tools/ in LoadModuleRestricted, line 130317:07
SRabbelierveelck: can you put the entire traceback on pastie?17:08
tpbTitle: New - Pastie (at
tpbTitle: #370550 - Pastie (at
veelckprolly I just did something wrong...17:10
SRabbelierveelck: yup17:10
SRabbelierveelck: look at the bottom line17:10
SRabbelierveelck: Exception Value: local variable 'patterns' referenced before assignment17:10
SRabbelierveelck: you used patterns before you defined it17:10
SRabbelierveelck: you probably need to do "patterns = []" or something similar17:11
veelckahh. true ;)17:11
*** veelck_ has quit IRC17:11
Lenniesince you are only creating one pattern you can make it a list immedeatly by surrounding it with []17:11
veelcki did something, that didn't provide me with an exception ;-)17:31
Lenniecool ^_^17:32
veelckanyway, wanna see what I have added ?17:32
Lenniesure but you can also see if it works for yourself17:33
veelckprobably I did something studid at the end ,)17:33
Lennieif you open up some random url17:33
Lennieif you have your melange running on that port you should see a huge list of url's we allow :P17:34
Lenniesomewhere it should show your added pattern17:34
Lennieif you called it manage like suggested it shouldn't be hard to find17:34
Lenniebecause it's the only one with manage in it17:35
Lenniestep 1 seems good :D17:35
veelckhaa :)17:35
Lennienow in host.py17:35
*** shiyee has quit IRC17:35
Lennieyou'll see rights['...'17:35
Lennielets set one for manage now so we dont forget later on17:36
solydzajsveelck: don't you have GoogleAppEngineLauncher on OS X ?17:36
veelckyep, i do17:36
solydzajsyou use it to run Melange locally on OS X or not ?17:37
veelcklocally, yes17:37
veelckbut thru the /thirdparty script atm17:37
veelcknot the appengineluncher17:37
solydzajsyou suck :-) AppEngineLauncher is so nice :-)17:37
veelckLennie: acces.checkIsHost?17:38
solydzajsj/k :-)17:38
veelcksolydzajs: haha, I know I suck ;-)17:38
Lennierights[<access_type>] = [list of checks]17:38
Lenniewould be better17:38
Lenniethat reminds me17:38
LennieI'm a fool17:38
Lenniedo access.checkIsHost for now :P17:39
LennieI think I gotta take a look at something17:39
veelckrights['manage'] = [access.checkIsHost]17:39
veelckjust something like that, right ?17:40
Lenniethat's perfect17:40
Lennienow scroll down to the bottom17:40
Lenniefor the real work17:40
veelckdone ;-)17:41
Lenniesorry was distracted17:42
Lenniehad to fix something stupid :p17:42
veelckah, np17:42
Lennieat the bottom you can see all the functions that can be called by a url17:42
Lennieor atleast the ones we mapped to an url17:42
Lennieyou'll need to add your own17:42
Lenniethe variable name should match the access type in this case17:43
Lenniecan you show me which pattern you entered?17:43
Lennieso I can see if you will be calling the right method you are about to write :D17:44
veelck    patterns = []17:44
veelck    patterns += [17:44
veelck        (r'^%(url_name)s/(?P<access_type>manage)/%(key_fields)s$',17:44
veelck        'soc.views.models.%(module_name)s.list_requests',17:44
veelck        'List of requests for %(name)s')]17:44
veelck    new_params['extra_django_patterns'] = patterns17:44
Lennieyou see the second entry?17:44
Lenniethat's the function call17:44
Lenniewe dont want that to call list_requests since that is not what we are going to use it for17:44
veelckso i should change the name17:44
Lenniemake it call manage17:45
veelckcool, I was sure that i did something wrong ;-)17:45
Lennieat the bottom add the following manage = view.manage17:45
veelckand in last line I should something like "manage the %(name)'s" ?17:45
Lenniethat's the page name17:46
*** SRabbelier has quit IRC17:46
Lennieit will be shown in the title bar of the web browser17:46
Lenniemake it look good :D17:46
Lennie%(name) means that it will replace it with params['name'] in base.view17:46
Lenniethat would be host in this case17:47
LennieManage the Host17:47
Lennieis a good start17:47
Lenniewe can always make it say more later on17:47
Lennieat the bottom add the following manage = view.manage ^_ ^17:48
Lennieif you press f5 you will get an error :P17:48
veelckbeen there though ;-)17:48
Lenniewe have just tried to call view.manage17:49
Lenniebut we havent added a manage method to the view yet17:49
Lennieso that's what we should do next17:49
veelckadd manage method to view ? .)17:49
Lenniethat's where your magic will happen17:49
Lennieand you'll write your code :D17:49
Lenniebetween lists and _editPost define the manage method17:50
Lenniethe signature is the same as list17:50
*** tanoku has quit IRC17:50
Lennienow there is a new trick that isn't used in host yet17:51
Lennieshould go above the method declaration17:52
Lenniethe first one will merge some given params into the params for this view17:52
Lenniethe second one will call the access check you define earlier17:52
Lenniesince hosts doesn't use decorators yet17:53
Lennieyou should add from soc.views.helper import decorators17:53
Lenniesomewhere in the import declarations on top17:54
Lenniewe do those grouped and alphabetically17:54
Lennieso you can probably figure out where it should go :)17:54
solydzajsveelck: decorators basically do something before the body of the method is executed17:55
Lenniegood point17:55
solydzajsbody of method or function17:55
veelckwill read up on the topic ;-)17:55
Lenniebelow the definition of manage17:56
Lennieplease type pass17:56
Lennieand press f517:56
Lennieit should give a did not return HTTPResponseObject error17:56
solydzajspass is used when you don't have any body17:56
Lennieunless I've failed you somewhere :)17:56
solydzajsin C you would do { } and that would work17:56
solydzajsbut in python you write pass17:56
Lennieanother good point :D17:56
Lenniethat's why you have @ ^_^17:56
veelcksolydzajs: I knew that ;-)17:57
solydzajsveelck: good :-)17:57
veelcksolydzajs: thx for tip anyway ;-)17:57
veelckLennie: what did you mean by F5, as I'm at eclipse in OS X so it's very probable that it didn't do what it suppose ;-)17:57
Lennieopen your browser17:58
Lenniego to17:58
veelckah ;-)17:58
veelckdidnt get any error17:58
Lennielogin as developer17:58
veelckstill no error ;-)17:59
Lenniethat's because I havent pointed you to the page yet :D18:00
veelckheh ;-)18:00
Lennieyou should create a program owner and program administrator :D18:00
Lennieso you can test stuff18:00
Lenniethen I can redirect you to the error D:18:00
Lennieand give you a few hints18:02
Lennieand then I need to go18:02
veelckprogram name: potest18:03
veelckprogram admin: veelck18:03
veelcks/name/owner name/18:03
Lennieshould go boom18:03
veelckmanage() got an unexpected keyword argument 'scope_path'18:04
Lenniedid it18:04
Lenniecan you paste me the line where you did18:04
Lenniedef manage18:04
*** madrazr has quit IRC18:04
veelck  @decorators.merge_params18:05
veelck  @decorators.check_access18:05
veelck  def manage(self, request, access_type, page_name=None,18:05
veelck           params=None, filter=None):18:05
veelck    """Manage the Host (mostly delete existing one)18:05
veelck    """18:05
veelck    pass18:05
Lenniemy mistake18:05
Lenniestupid me :D18:05
Lennie(self, request, access_type,18:05
Lenniepage_name=None, params=None, **kwargs):18:05
Lennieuse that please :D18:06
veelckyep, now looks ok18:06
Lenniethat's the signature that is used to call a view method via the url18:06
veelckThe view didn't return an HttpResponse object.18:06
LennieHttpResponseobjects contain as it says a HTTP response18:07
Lennieeither be it a 404 not found18:07
Lennie505 error18:07
Lennieor a web page :P18:07
Lenniewhich is what we want to ahppen18:07
veelckmaybe some day ;-)18:07
Lenniethe cool thing is18:08
veelckhopefully soon18:08
Lennieyou can now do stuff like write dilskajdf as a variable18:08
Lennieand it will crash18:08
Lennieyou can then see everything you have access to in that method in your webbrowser18:08
Lennieso you can easily see what you need :)18:08
Lenniethat's the power of the django debug view18:09
Lennieit captures the environment at the moment of the error18:09
Lennieif you take a look at the error you had18:09
Lennieyou can scroll a bit down18:09
Lennieen press expand18:09
Lennieyou probably dont have much in there at the moment since we did pass and the error occured back in django18:10
Lenniebut it's an easy way to debug by just typing some random name to make it give an error :)18:10
veelckdon't have expand ;-)18:10
Lennieand then you can see what's happening18:10
veelckcool :)18:10
veelckno I have to code something real ;-)18:11
Lennieyes :)18:11
veelckbig thank you, Lennie :)18:11
Lenniea good example is in request.py18:11
veelcki owe you one :)18:11
LennieI would expect something similiar using a GET parameters do decide if a host should be removed18:12
Lennieyou should take a look at the method in request.py18:13
Lennieand try to understand what it does18:13
Lennieand take that with you to the method in host.py18:13
veelckok :)18:14
LennieI have to go now but solydzajs can answer more questions :)18:14
veelckcool, thanks one more time ;)18:14
Lenniejust get it doen :D18:14
solydzajscya Lennie till tomorrow18:14
veelckhaha :)18:14
veelcktake care man18:14
LennieI'll make the members list for clubs and such18:14
solydzajsLennie: conference call tomorrow, you will be actively talking about clubs :-)18:14
Lennie^_ ^18:15
Lennieit's not done yet :P18:15
Lenniethat's all I can say :D18:15
LennieI had to write a nice request system :D18:15
solydzajsI know ;-)18:15
solydzajswe will mention that to Chris too18:15
Lenniebut it's getting back on speed now :D18:15
Lennieluckily almost everything has been refactored already18:16
Lennieso orgs should be a piece of cake :D18:16
Lennieyou should add clean functions for forms to the todo list btw18:16
Lenniewe need the uniqueness checks and such ^_ ^18:17
solydzajsok will add it18:19
*** Lennie has quit IRC18:21
*** solydzajs has quit IRC19:31
*** dmitrig01|afk is now known as dmitrig0120:03
*** dmitrig01|afk has joined #melange20:05
*** ChanServ sets mode: +v dmitrig01|afk20:05
*** dmitrig01|afk has quit IRC20:08
*** dmitrig01|afk has joined #melange20:12
*** ChanServ sets mode: +v dmitrig01|afk20:12
*** dmitrig01|afk is now known as dmitrig0120:57
*** mithro has joined #melange22:30
*** ChanServ sets mode: +v mithro22:30
*** no_mind has quit IRC22:39
*** no_mind has joined #melange22:39
*** SRabbelier has joined #melange23:42
*** ChanServ sets mode: +v SRabbelier23:42

Generated by 2.17.2 by Marius Gedminas - find it at!