ft_transcendence/profiles/urls.py

16 lines
665 B
Python
Raw Permalink 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"),
2023-12-20 17:48:52 -05:00
path("block", views.BlocksView.as_view(), name="block_page"),
path("block/<int:pk>", views.BlockView.as_view(), name="block_page"),
] + static("/static/avatars/", document_root="./avatars")