标签: django-rest-framework jwt
我要注销并删除令牌。请帮助我,非常感谢。
类LoginView(TokenObtainPairView): serializer_class = MyTokenSerializer
类MyTokenSerializer(TokenObtainPairSerializer): @classmethod def get_token(cls,用户): 令牌= super()。get_token(用户) token ['username'] = user.username 返回令牌