ux: Me becomes Settings; backend: fix special usernames (me, block...)

This commit is contained in:
AdrienLSH
2024-02-08 10:09:36 +01:00
parent 1dea678a04
commit 55d3ea40f6
11 changed files with 17 additions and 18 deletions

View File

@ -1,17 +1,16 @@
from django.urls import path
from django.conf import settings
from django.conf.urls.static import static
from . import viewsets
from . import views
urlpatterns = [
path("me", viewsets.MyProfileViewSet.as_view({'patch': 'partial_update', 'get': 'retrieve'}), name="my_profile_page"),
path("settings", viewsets.MyProfileViewSet.as_view({'patch': 'partial_update'}), name="my_profile_page"),
path("me", viewsets.MyProfileViewSet.as_view({'get': 'retrieve'}), name="my_profile_page"),
path("", viewsets.ProfileViewSet.as_view({'get': 'list'}), name="profiles_list"),
path("block", views.BlocksView.as_view(), name="block_page"),
path("block/<int:pk>", views.BlockView.as_view(), name="block_page"),
path("friend", views.FriendsView.as_view(), name="friend_page"),
path("<str:username>", viewsets.ProfileViewSet.as_view({'get': 'retrieve'}), name="profile_page"),
path("user/<str:username>", viewsets.ProfileViewSet.as_view({'get': 'retrieve'}), name="profile_page"),
path("id/<int:pk>", viewsets.ProfileViewSet.as_view({'get': 'retrieve_id'}), name="profile_page"),
] + static("/staqic/avatars/", document_root="./avatars")
]