bradtraversy/lead_manager_react_django

how would a user delete their own account?

Opened this issue · 6 comments

how would a user delete their own account?

In the project that feature is not there, but you can add by just deleting the instance that is provided by Django ORM

how would i do that?

User.objects.filter(id=id).delete()

so make another viewset and serializer?

yes

would it be like this?

class UserDeleteSet(viewsets.ModelViewSet):
User.objects.filter(id=id).delete()
serializer_class = UserSerializer