profiles: block rework and tests

This commit is contained in:
AdrienLSH
2024-04-07 16:58:29 +02:00
parent 13a078eb82
commit 8912e39fa4
10 changed files with 115 additions and 91 deletions

View File

@ -2,15 +2,15 @@ from django.urls import path
from .viewsets.ProfileViewSet import ProfileViewSet
from .viewsets.MyProfileViewSet import MyProfileViewSet
from . import views
from .views.blocks import GetBlocksView, EditBlocksView
urlpatterns = [
path("settings", MyProfileViewSet.as_view({'patch': 'partial_update', 'delete': 'delete_avatar'}), name="my_profile_page"),
path("me", MyProfileViewSet.as_view({'get': 'retrieve'}), name="my_profile_page"),
path("", ProfileViewSet.as_view({'get': 'list'}), name="profiles_list"),
path("block", views.BlocksView.as_view(), name="block_page"),
path("block/<int:pk>", views.BlocksView.as_view(), name="block_page"),
path("friend", views.FriendsView.as_view(), name="friend_page"),
path("block", GetBlocksView.as_view(), name="block_page"),
path("block/<int:pk>", EditBlocksView.as_view(), name="block_page"),
# path("friend", views.FriendsView.as_view(), name="friend_page"),
path("user/<str:username>", ProfileViewSet.as_view({'get': 'retrieve'}), name="profile_page"),
path("id/<int:pk>", ProfileViewSet.as_view({'get': 'retrieve_id'}), name="profile_page"),
]