Hi,
I'm attempting to use one of the new class-based TemplateView with the permission_required decorator:
@permission_required('foo.count_peas')
class Pea(TemplateView):
template_name = "pea.html"
However, when I do that, I get an error:
Exception Type: AttributeError at /someurl/
Exception Value: 'function' object has no attribute 'as_view'
If I comment out the permission_required decorator, the view seems to work fine.
Are the new class-based views compatible with the permission_required decorator?
Or is there something I need to do to make them work together.
Cheers,
Victor