ft_transcendence/profiles/urls.py

14 lines
592 B
Python
Raw Normal View History

2023-10-24 12:42:43 -04:00
from django.urls import path
2023-12-06 09:19:41 -05:00
from django.conf import settings
from django.conf.urls.static import static
2023-10-24 12:42:43 -04:00
2023-12-06 09:19:41 -05:00
from . import viewsets
from . import views
2023-10-24 12:42:43 -04:00
urlpatterns = [
2023-12-16 12:00:38 -05:00
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"),
2023-12-08 11:36:41 -05:00
path("", viewsets.ProfileViewSet.as_view({'get': 'list'}), name="profiles_list"),
path("block", views.BlockView.as_view(), name="block_page"),
] + static("/static/avatars/", document_root="./avatars")