diff --git a/fedireads/templates/user.html b/fedireads/templates/user.html index 79605dbe..0e5ba6a4 100644 --- a/fedireads/templates/user.html +++ b/fedireads/templates/user.html @@ -16,7 +16,7 @@ {% if is_self %}
- Edit profile + Edit profile
{% endif %} diff --git a/fedireads/urls.py b/fedireads/urls.py index 4e1c5fee..d962671b 100644 --- a/fedireads/urls.py +++ b/fedireads/urls.py @@ -41,8 +41,7 @@ urlpatterns = [ re_path(r'^logout/?$', views.user_logout), re_path(r'^notifications/?', views.notifications_page), re_path(r'%s/?$' % user_path, views.user_page), - re_path(r'%s/edit/?$' % user_path, views.edit_profile_page), - re_path(r'^user/edit/?$', views.edit_profile_page), + re_path(r'edit_profile_page/?$', views.edit_profile_page), re_path(r'%s/?$' % status_path, views.status_page), re_path(r'^book/(?P\w+)/?$', views.book_page), re_path(r'^book/(?P\w+)/(?Pfriends|local|federated)?$', views.book_page), diff --git a/fedireads/views.py b/fedireads/views.py index 8899f9a5..17f183fa 100644 --- a/fedireads/views.py +++ b/fedireads/views.py @@ -204,12 +204,9 @@ def status_page(request, username, status_id): @login_required -def edit_profile_page(request, username): +def edit_profile_page(request): ''' profile page for a user ''' - try: - user = models.User.objects.get(localname=username) - except models.User.DoesNotExist: - return HttpResponseNotFound() + user = request.user form = forms.EditUserForm(instance=request.user) data = {