from django.urls import path, re_path # from django.conf.urls import url from rest_framework.urlpatterns import format_suffix_patterns from . import views urlpatterns = format_suffix_patterns([ path("apartaments/", views.ApartamentViewSet.as_view({'get': 'list'})), path("apartament//", views.ApartamentViewSet.as_view({'get': 'retrieve'})), path("apartaments/comparison/", views.ApartamentGetManyViewSet.as_view({'get': 'retrieve'})), # пример: apartaments/comparison/?user_id=1 user_id - id пользователя path("apartaments/favorite/", views.ApartamentGetManyViewSet.as_view({'get': 'list'})), # пример: apartaments/favorite/?user_id=1 user_id - id пользователя path("apartaments/filters/", views.ApartmentFilter.as_view({'post': 'list'})), path("psych_test/add_result/", views.PsychTestAddResultViewSet.as_view({'post': 'create'})), # пример: psych_test/add_result/1/?result=50 result - результат псих теста пользователя path("users/get_compatible", views.CompatibleUsersView.as_view({'post': 'list'})), # auth re_path(r'^auth/vvsu/', views.VVSUAuthProxy), path('auth/user/login', views.UserLogin) ])