Tuesday, 2010-06-29

*** tpb has joined #melange00:00
*** dr__house has joined #melange03:12
*** scorche has quit IRC03:54
*** scorche` has joined #melange03:54
*** scorche has joined #melange04:55
*** scorche` has quit IRC04:55
*** scorche has quit IRC05:07
*** scorche has joined #melange05:07
*** scorche has quit IRC05:10
*** scorche has joined #melange05:10
*** scorche has quit IRC05:41
*** scorche has joined #melange06:09
*** neo7 has joined #melange06:28
*** madrazr has joined #melange07:17
*** ChanServ sets mode: +v madrazr07:17
*** madrazr has quit IRC08:09
*** MatthewWilkes has joined #melange08:41
*** madrazr has joined #melange09:20
*** ChanServ sets mode: +v madrazr09:20
*** madrazr has quit IRC09:23
*** madrazr has joined #melange09:23
*** ChanServ sets mode: +v madrazr09:23
*** neo7 has quit IRC09:34
*** neo7 has joined #melange09:36
*** madrazr has quit IRC09:36
*** madrazr1 has joined #melange09:36
*** madrazr1 has quit IRC09:43
*** neo7 has quit IRC09:58
*** madrazr has joined #melange10:20
*** ChanServ sets mode: +v madrazr10:20
sttwisterSRabbelier: madrazr: can you help me a bit a please? I'm having troubles adding the check_access decorator to my views13:23
madrazrsttwister: yes ask away13:23
sttwisterthis is the output: http://pastebin.com/D1LpfPBh13:24
tpbTitle: Environment: Request Method - Anonymous - D1LpfPBh - Pastebin.com (at pastebin.com)13:24
sttwisterso I guess it's not calling it with the right number of parameters13:25
*** sttwister_ has joined #melange13:26
sttwister_sry I got d/c13:27
sttwister_my view is: def home(self, request, check_access, page_name=None, params=None, **kwargs):13:27
*** sttwister has quit IRC13:30
madrazrsttwister_: Ok13:33
madrazrchecking13:33
*** sttwister_ is now known as sttwister13:33
madrazrsttwister: can you please paste your rights dictionary?13:34
sttwisterI just did a "rights = access.DataSeederChecker(params)"13:35
sttwisterdo I need to supply more details ?13:35
sttwisterI also tried things like "rights['home'] = ['checkIsDeveloper']"13:36
sttwisternot sure how this works exactly tbh13:36
sttwistermadrazr: ping13:38
madrazrsttwister: yeah I understand13:38
madrazrsttwister: it is actually overwhelming initially :D13:38
madrazrsttwister: but yeah we are here to help you13:38
sttwistermadrazr: :)13:39
madrazrsttwister: do I have a chance to look at your code?13:39
madrazrsttwister: is it available somewhere?13:39
sttwistermadrazr: http://code.google.com/r/sttwister-gsoc2010/source/browse/app/soc/modules/seeder/views/seeder.py13:40
tpb<http://ln-s.net/7-vz> (at code.google.com)13:40
madrazrsttwister: seeing13:45
madrazrsttwister: this is the code that is throwing up errors?13:45
sttwisteryep, I just added check_access decorator to any of the views13:45
sttwisterand the access_type parameter to the function definition13:45
madrazrsttwister: cool!13:46
madrazrsttwister: if you add a check_access decorator13:46
madrazryou need to write "Rights" definition for that view13:46
madrazrsttwister: let me fetch some samples for you13:46
madrazrsttwister: just a side note. Code reading is always the awesomest exercise for a developer13:47
madrazrI keep telling this almost every day to Savitha too :)13:47
sttwistermadrazr: cool, thanks13:47
sttwistermadrazr: heh, yes indeed it is13:47
madrazrsttwister: searching for samples13:47
madrazrand pointers ...13:47
madrazrsttwister: http://code.google.com/p/soc/source/browse/app/soc/modules/ghop/views/models/task.py13:49
tpb<http://ln-s.net/7-wJ> (at code.google.com)13:49
madrazrsttwister: http://code.google.com/p/soc/source/browse/app/soc/modules/ghop/views/models/task.py#71813:49
tpb<http://ln-s.net/7-wL> (at code.google.com)13:49
madrazrI have this method called listOrgTasks for example13:49
madrazrsttwister: for this I define the access name as list_org_tasks here http://code.google.com/p/soc/source/browse/app/soc/modules/ghop/views/models/task.py#143513:50
tpb<http://ln-s.net/7-wM> (at code.google.com)13:50
madrazrrather access_type13:50
madrazrsttwister: this is used in URL Pattern too13:50
madrazrhttp://code.google.com/p/soc/source/browse/app/soc/modules/ghop/views/models/task.py#20413:50
tpb<http://ln-s.net/7-wN> (at code.google.com)13:50
madrazrsttwister: and I have an access check rule written for it here for that access type13:51
madrazrhttp://code.google.com/p/soc/source/browse/app/soc/modules/ghop/views/models/task.py#16413:51
tpb<http://ln-s.net/7-wO> (at code.google.com)13:51
madrazrsttwister: getting ideas?13:51
sttwistermadrazr: cool, well I figured it should be something like that13:51
sttwistermadrazr: I did everything you mentioned, except for the url pattern13:52
madrazrsttwister: did you add rights['<access_type>'] too?13:52
sttwistermadrazr: guess that's why it's not including the access_type parameter and raising that exception13:52
madrazrthe rule for access check?13:52
madrazrsttwister: yeah of course :)13:52
sttwistermadrazr: yep, I did that13:53
sttwistermadrazr: ok, so my pattern looks like this '^%(url_name)s/(?P<access_type>home)$'13:55
sttwisterurl_name is 'seeder'13:55
sttwisterI get another error13:56
sttwisterbecause 'js_uses_all' is not in self._params :/13:56
madrazrsttwister: that is weird13:57
madrazrare you using it the same way other views are using it?13:57
madrazrsttwister: have you read other views code?13:57
sttwistermadrazr: well, it's a bit more tricky13:58
sttwistermadrazr: because my view is not tied to a model like I said... so I'm not using the constructParams helper function13:58
sttwistermadrazr: I guess that's causing some things to break13:58
madrazrsttwister: Oh14:00
madrazrsttwister: I need to read more of your code then14:01
madrazrsttwister: could you override constructParams to use only what you want?14:01
sttwistermadrazr: yep probably, that should also be the long term solution14:02
madrazrsttwister: nothing pops out of my head for a short term solution though :(14:05
madrazrsttwister: may be when SRabbelier is around you can ping him about this, don't be discouraged, I am just not able to get anything immediately14:05
sttwistermadrazr: ok, sure, thanks14:05
*** madrazr has quit IRC15:17
*** madrazr has joined #melange16:35
*** ChanServ sets mode: +v madrazr16:35
*** sttwister has quit IRC16:39
*** dhaun has joined #melange17:17
*** MatthewWilkes has quit IRC17:26
*** sttwister has joined #melange18:01
*** dr__house has quit IRC18:53
*** harlan_ is now known as harlan19:23
*** harlan has quit IRC19:23
*** harlan has joined #melange19:23
*** madrazr has quit IRC21:12
*** dhaun has quit IRC21:23

Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!