View for moderators deleting users

This commit is contained in:
Mouse Reeve
2021-09-08 16:58:16 -07:00
parent 31e6e59047
commit 916be2552d
2 changed files with 20 additions and 1 deletions

View File

@ -55,7 +55,6 @@ class DeleteUser(View):
def post(self, request):
"""les get fancy with images"""
form = forms.DeleteUserForm(request.POST, instance=request.user)
form.is_valid()
# idk why but I couldn't get check_password to work on request.user
user = models.User.objects.get(id=request.user.id)
if form.is_valid() and user.check_password(form.cleaned_data["password"]):