Re: [Repoze-dev] ActionProtector

2009-02-18 Thread Iain Campbell
Hi Bruno,

2009/2/17 binet bruno :
>
> You should use version 1.0b3 of repoze.what-pylons, which Gustavo has
> released today, instead of 1.0b2. It should solve your problem.

That fixed the problem. Thanks :-)

Iain

-- 
www.kandaba.com

web | iptv | mobile
development & consultancy

t: +44 (0) 203 051 7792
m: +44 (0) 7815 821 678
gtalk: i...@kandaba.com
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] ActionProtector

2009-02-17 Thread Iain Campbell
Oh, I'm using Python 2.5...

-- 
www.kandaba.com

web | iptv | mobile
development & consultancy

t: +44 (0) 203 051 7792
m: +44 (0) 7815 821 678
gtalk: i...@kandaba.com
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] ActionProtector

2009-02-17 Thread Iain Campbell
2009/2/17 binet bruno :
>
> You should use version 1.0b3 of repoze.what-pylons, which Gustavo has
> released today, instead of 1.0b2. It should solve your problem.
> Cheers,

OK thanks, I'll give it a go. After posting I noticed that the version
information was only relevant at the controller level, not the action
level.

I'll update and see how I get on.

Thanks again,

Iain

-- 
www.kandaba.com

web | iptv | mobile
development & consultancy

t: +44 (0) 203 051 7792
m: +44 (0) 7815 821 678
gtalk: i...@kandaba.com
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] ActionProtector

2009-02-17 Thread binet bruno
Hi,

You should use version 1.0b3 of repoze.what-pylons, which Gustavo has
released today, instead of 1.0b2. It should solve your problem.
Cheers,

Bruno

2009/2/17 Iain Campbell :
> Hi,
>
> Having sorted out the authentication, I'm now having a (presumably
> small) problem protecting controller actions. Following the quick
> start, if I do:
>
> @ActionProtector(has_permission('something'))
>  def index(self):
>return render('/derived/document/index.html')
>
> I get the following traceback:
>
> File 
> '/usr/lib/python2.5/site-packages/repoze.what_pylons-1.0b2-py2.5.egg/repoze/what/plugins/pylonshq/protectors.py',
> line 95 in check
>  return func(*args, **kwargs)
> TypeError: index() got an unexpected keyword argument 'action'
>
> The actual arguments being passed to the controller action are:
>
> action, start_response, controller, environ, pylon
>
> I'm assuming I shouldn't actually have to handle these in the controller 
> action?
>
> Thanks,
>
> Iain
>
> --
> www.kandaba.com
>
> web | iptv | mobile
> development & consultancy
>
> t: +44 (0) 203 051 7792
> m: +44 (0) 7815 821 678
> gtalk: i...@kandaba.com
> ___
> Repoze-dev mailing list
> Repoze-dev@lists.repoze.org
> http://lists.repoze.org/listinfo/repoze-dev
>
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] ActionProtector

2009-02-17 Thread Gustavo Narea
On Tuesday February 17, 2009 14:52:38 Iain Campbell wrote:
> I should RTFM more carefully...just realised it's probably due to my
> version of Python...

Python 2.4-2.6 are supported and tested. Are you using an older version?
-- 
Gustavo Narea .

Get rid of unethical constraints! Get freedomware:
http://www.getgnulinux.org/
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] ActionProtector

2009-02-17 Thread Iain Campbell
I should RTFM more carefully...just realised it's probably due to my
version of Python...

Iain

-- 
www.kandaba.com

web | iptv | mobile
development & consultancy

t: +44 (0) 203 051 7792
m: +44 (0) 7815 821 678
gtalk: i...@kandaba.com
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev