zenbug
04/07/2022, 9:40 AM@verify_session()
comes into play.rp_st
04/07/2022, 9:41 AMzenbug
04/07/2022, 9:43 AMbackend_1 | File "/usr/local/lib/python3.8/site-packages/supertokens_python/recipe/session/api/implementation.py", line 51, in verify_session
backend_1 | method = normalise_http_method(api_options.request.method())
backend_1 | File "/usr/local/lib/python3.8/site-packages/supertokens_python/framework/django/django_request.py", line 45, in method
backend_1 | if self.request.method is None:
backend_1 | AttributeError: 'UserAPI' object has no attribute 'method'
rp_st
04/07/2022, 9:53 AMzenbug
04/07/2022, 9:57 AMfrom supertokens_python.recipe.session.framework.django.syncio import verify_session
class UserAPI(generics.RetrieveAPIView):
serializer_class = UserSerializer
@verify_session()
def get_object(self):
return self.request.user
django version 3.2.11
supertokens-python version 0.6.1
rp_st
04/07/2022, 10:00 AMzenbug
04/07/2022, 10:01 AMrp_st
04/07/2022, 10:06 AMzenbug
04/07/2022, 10:28 AMrp_st
04/07/2022, 10:33 AMverify_session
function to work in that way,. Though it would be nice if we would have done it the "django way". So we are investigating it. If you open an issue, you can keep track of the progress etc more easily.zenbug
04/07/2022, 10:49 AMrp_st
04/07/2022, 12:22 PMrp_st
04/07/2022, 12:57 PMzenbug
04/07/2022, 1:33 PM