On 16 February 2011 19:46, Andre Terra <andrete...@gmail.com> wrote:
> I should also add that the functionality described in the docs simply did
> not work for me:
> http://docs.djangoproject.com/en/dev//topics/class-based-views/#decorating-the-class
>
> My attempt to follow that approach is registered here:
> http://dpaste.com/hold/423359/

It's an error in the docs. It should be:

class ProtectedView(TemplateView):
    template_name = 'secret.html'

    @method_decorator(login_required)
    def dispatch(self, *args, **kwargs):
        return super(ProtectedView, self).dispatch(*args, **kwargs)

You can report it to the bug tracker here:
http://code.djangoproject.com/newticket

Thanks.

-- 
Łukasz Rekucki

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to