I am unsure of what went wrong but I still cannot delete my own account.

I am just redirected to a home page.

Views.py

```
def delete_user(request, username):

    if request.method == 'DELETE':
        try:
            user = User.objects.get(username = username)
            user.delete()
            context['msg'] = 'Bye Bye'
        except Exception as e: 
            context['msg'] = 'Something went wrong!'

    else:
        context['msg'] = 'Request method should be "DELETE"!'

    return render(request, 'HomeFeed/snippets/home.html', context=context) 

```

urls.py

```
from account.views import (
    delete_user,
)

 path('delete/<username>', delete_user, name='delete_account'),

```

account.html

```
      <form action="{% url 'account:delete_account' username=request.user.username %}" method="GET">
  <a class="mt-4 btn btn-danger deleteaccount" onclick="return confirm('Are you sure you want to delete your account')" href="">Delete Account</a> 
</form>   

```