ft_transcendence/profiles/urls.py
2023-12-16 18:00:38 +01:00

11 lines
509 B
Python

from django.urls import path
from django.conf import settings
from django.conf.urls.static import static
from . import viewsets
urlpatterns = [
path("me", viewsets.MyProfileViewSet.as_view({'patch': 'partial_update', 'get': 'retrieve'}), name="my_profile_page"),
path("<int:pk>", viewsets.ProfileViewSet.as_view({'get': 'retrieve'}), name="profile_page"),
path("", viewsets.ProfileViewSet.as_view({'get': 'list'}), name="profiles_list"),
] + static("/static/avatars/", document_root="./avatars")