2023-05-15 13:01:57 +02:00
|
|
|
from django.urls import path, re_path
|
|
|
|
# from django.conf.urls import url
|
2023-05-03 11:56:13 +02:00
|
|
|
from rest_framework.urlpatterns import format_suffix_patterns
|
2023-05-01 12:39:34 +02:00
|
|
|
|
2023-05-03 11:56:13 +02:00
|
|
|
from . import views
|
2023-05-01 12:39:34 +02:00
|
|
|
|
2023-05-03 11:56:13 +02:00
|
|
|
urlpatterns = format_suffix_patterns([
|
|
|
|
path("apartaments/", views.ApartamentViewSet.as_view({'get': 'list'})),
|
|
|
|
path("apartament/<int:pk>/", views.ApartamentViewSet.as_view({'get': 'retrieve'})),
|
2023-05-09 10:32:18 +02:00
|
|
|
path("apartaments/comparison/", views.ApartamentGetManyViewSet.as_view({'get': 'retrieve'})), # пример: apartaments/comparison/?user_id=1 user_id - id пользователя
|
2023-05-09 13:03:37 +02:00
|
|
|
path("apartaments/favorite/", views.ApartamentGetManyViewSet.as_view({'get': 'list'})), # пример: apartaments/favorite/?user_id=1 user_id - id пользователя
|
2023-05-12 14:10:12 +02:00
|
|
|
path("apartaments/filters/", views.ApartmentFilter.as_view({'post': 'list'})),
|
2023-05-16 12:07:50 +02:00
|
|
|
|
|
|
|
# user
|
|
|
|
path("user/get_compatible", views.CompatibleUsersView.as_view({'post': 'list'})),
|
|
|
|
# пример: psych_test/add_result/1/?result=50 result - результат псих теста пользователя
|
|
|
|
path("psych_test/add_result/<int:pk>", views.PsychTestAddResultViewSet.as_view({'post': 'create'})),
|
|
|
|
path('user/get', views.UserGet.as_view()),
|
2023-05-16 08:24:22 +02:00
|
|
|
|
|
|
|
# auth
|
2023-05-15 13:01:57 +02:00
|
|
|
re_path(r'^auth/vvsu/', views.VVSUAuthProxy),
|
2023-05-16 09:42:44 +02:00
|
|
|
path('auth/user/login', views.UserLogin.as_view())
|
2023-05-03 11:56:13 +02:00
|
|
|
])
|