def delete(request): amouser = request.amo_user form = forms.UserDeleteForm(request.POST or None, request=request) if request.method == "POST" and form.is_valid(): messages.success(request, _("Profile Deleted")) amouser.anonymize() logout(request) form = None return redirect("users.login") return jingo.render(request, "account/delete.html", {"form": form, "amouser": amouser})
def delete(request): amouser = request.amo_user form = forms.UserDeleteForm(request.POST or None, request=request) if request.method == 'POST' and form.is_valid(): messages.success(request, _('Profile Deleted')) amouser.anonymize() logout(request) form = None return redirect('users.login') return jingo.render(request, 'account/delete.html', {'form': form, 'amouser': amouser})