From c4198a64afa3b15e11b9169a26a3afc24c463d3a Mon Sep 17 00:00:00 2001 From: Pierre-antoine Comby <comby@crans.org> Date: Tue, 3 Mar 2020 14:45:50 +0100 Subject: [PATCH] add button for profile pic view --- apps/member/urls.py | 1 + templates/member/profile_detail.html | 1 + 2 files changed, 2 insertions(+) diff --git a/apps/member/urls.py b/apps/member/urls.py index 652d1e1f..87ae662b 100644 --- a/apps/member/urls.py +++ b/apps/member/urls.py @@ -15,6 +15,7 @@ urlpatterns = [ path('user/', views.UserListView.as_view(), name="user_list"), path('user/<int:pk>', views.UserDetailView.as_view(), name="user_detail"), path('user/<int:pk>/update', views.UserUpdateView.as_view(), name="user_update_profile"), + path('user/<int:pk>/update_pic', views.UserUpdateView.as_view(), name="user_update_pic"), path('user/<int:pk>/aliases', views.AliasView.as_view(), name="user_alias"), path('user/aliases/delete/<int:pk>', views.DeleteAliasView.as_view(), name="user_alias_delete"), path('manage-auth-token/', views.ManageAuthTokens.as_view(), name='auth_token'), diff --git a/templates/member/profile_detail.html b/templates/member/profile_detail.html index c3301fd6..930352bd 100644 --- a/templates/member/profile_detail.html +++ b/templates/member/profile_detail.html @@ -46,6 +46,7 @@ {%if request.get_full_path != user_profile_url %} <a class="btn btn-primary btn-sm" href="{{ user_profile_url }}">{% trans 'View Profile' %}</a> {% endif %} + <a class="btn btn-primary btn-sm" href="{% url 'member:user_update_pic' object.pk %}">{% trans 'Change Avatar' %}</a> </div> </div> </div> -- GitLab