legacy/pairent_backend/pairent_app/urls.py

13 lines
630 B
Python
Raw Normal View History

2023-05-01 12:39:34 +02:00
from django.urls import path
from rest_framework.urlpatterns import format_suffix_patterns
2023-05-01 12:39:34 +02:00
from . import views
2023-05-01 12:39:34 +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
# TODO: доработать
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'})),
])