profiles: block rework and tests
This commit is contained in:
@ -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"),
|
||||
]
|
||||
|
Reference in New Issue
Block a user