Thank you all for your replies. My search on the topic had missed
most
of the past discussion, which I'm now catching up on.
Carl Meyer wrote:
> > @method_decorator(permission_required, 'thing.change_thing')
>
> Is this really any better than
> @method_decorator(permission_required("thing.change_
On 17/02/12 18:04, Tobia Conforto wrote:
> Hello
>
> As a happy user of the class-based views, I wrote a couple of
> higher-level decorators to make it easy to apply all the standard
> decorators to them.
>
> The first is an updated version of method_decorator, made to accept
> additional argume
On 17 February 2012 20:22, Carl Meyer wrote:
>
>> The second is class_view_decorator, to apply classic view decorators
>> to the newer class-based views:
>>
>> @class_view_decorator(never_cache)
>> @class_view_decorator(login_required, login_url='/my-login')
>> @class_view_decorator(permission_req
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hello Tobia,
Thanks for taking the time to propose these additions. Comments below:
On 02/17/2012 11:04 AM, Tobia Conforto wrote:
> The first is an updated version of method_decorator, made to accept
> additional arguments and pass them to the origin
Hello
As a happy user of the class-based views, I wrote a couple of higher-level
decorators to make it easy to apply all the standard decorators to them.
The first is an updated version of method_decorator, made to accept additional
arguments and pass them to the original decorator:
class MyVi