how would a user delete their own account?
Opened this issue · 6 comments
redxzeta commented
how would a user delete their own account?
deerajDev commented
In the project that feature is not there, but you can add by just deleting the instance that is provided by Django ORM
redxzeta commented
how would i do that?
deerajDev commented
User.objects.filter(id=id).delete()
redxzeta commented
so make another viewset and serializer?
deerajDev commented
yes
redxzeta commented
would it be like this?
class UserDeleteSet(viewsets.ModelViewSet):
User.objects.filter(id=id).delete()
serializer_class = UserSerializer