0

I want to use @protected_resource() decorator with class-based views.

But I get error: 'update_card' object has no attribute 'get_full_path'

In documentation Class-based views page is empty https://django-oauth-toolkit.readthedocs.org/en/latest/views/class_based.html

How I can protect my class-based view with decorator?

Zulfugar Ismayilzadeh
  • 2,643
  • 3
  • 16
  • 26

1 Answers1

1

I've found solution myself:

Instead of django.views.generic.View I used oauth2_provider.views.generic.ProtectedResourceView.

Zulfugar Ismayilzadeh
  • 2,643
  • 3
  • 16
  • 26