Skip to content

Commit 2adf1a4

Browse files
heysamtexasclaude
andcommitted
remove: deprecate custom /profile/ functionality in favor of django-allauth
- Remove custom profile URL pattern, view, and templates - Update navigation to link to django-allauth account management - Fix redirect references in organization views to use organizations list - Custom profile functionality was superseded by allauth's built-in account management Closes #193 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent dd1ac80 commit 2adf1a4

File tree

7 files changed

+3
-67
lines changed

7 files changed

+3
-67
lines changed

src/config/urls.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
path("accounts/", include("allauth.urls")),
2222
path("", myapp.views.index, name="home"),
2323
path("health-check/", myapp.views.health_check, name="health-check"),
24-
path("profile/", myapp.views.my_profile, name="profile"),
2524
path(
2625
"organizations/",
2726
include(("organizations.urls", "organizations"), namespace="organizations"),

src/myapp/templates/_header.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<button class="btn btn-dark dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">{{ request.user }}</button>
1616
<ul class="dropdown-menu dropdown-menu-dark dropdown-menu-end">
1717
<li><a class="dropdown-item" href="{% url 'organizations:list' %}">Organizations</a></li>
18-
<li><a class="dropdown-item" href="{% url 'profile' %}">Profile</a></li>
18+
<li><a class="dropdown-item" href="{% url 'account_email' %}">Account Settings</a></li>
1919

2020
{% url 'account_email' as email_url_ %}
2121
{% url 'socialaccount_connections' as socialaccount_url_ %}

src/myapp/templates/account/profile.html

Lines changed: 0 additions & 33 deletions
This file was deleted.

src/myapp/views/__init__.py

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
"""Basic views for myapp."""
22

3-
from allauth.socialaccount.models import SocialAccount
43
from django.contrib import messages
5-
from django.contrib.auth.decorators import login_required
64
from django.http import HttpRequest, HttpResponse
75
from django.shortcuts import render
86

@@ -26,22 +24,3 @@ def health_check(request: HttpRequest) -> HttpResponse: # noqa: ARG001
2624
:return:
2725
"""
2826
return HttpResponse(b"OK")
29-
30-
31-
@login_required
32-
def my_profile(request: HttpRequest) -> HttpResponse:
33-
"""Profile page view. This page shows the user's profile information.
34-
35-
:param request:
36-
:return:
37-
"""
38-
# pylint: disable=no-member
39-
social_accounts = SocialAccount.objects.all()
40-
41-
return render(
42-
request,
43-
"account/profile.html",
44-
{
45-
"social_accounts": social_accounts,
46-
},
47-
)

src/organizations/views/members.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def remove_member(request: HttpRequest, slug: str) -> HttpResponse:
4848
if target == org_member:
4949
target.delete()
5050
messages.success(request, "You have left the organization.")
51-
return redirect("profile")
51+
return redirect("organizations:list")
5252

5353
# only owners and admins can remove members
5454
if not org_member.can_admin:

src/organizations/views/organizations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def delete_organization(request: HttpRequest, slug: str) -> HttpResponse:
138138
if form.is_valid():
139139
org_member.organization.delete()
140140
messages.success(request, "Organization deleted successfully.")
141-
return redirect("profile")
141+
return redirect("organizations:list")
142142
else:
143143
form = DeleteOrganizationForm()
144144

src/templates/profile.html

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)