Python · 972 bytes Raw Blame History
1 from django.urls import path
2 from . import views
3
4 urlpatterns = [
5 # Health check
6 path('health/', views.health_check, name='health_check'),
7
8 # CORS test endpoint
9 path('cors-test/', views.cors_test, name='cors_test'),
10
11 # Restaurant endpoints
12 path('restaurants/', views.RestaurantListCreateView.as_view(), name='restaurant_list_create'),
13 path('restaurants/nearby/', views.NearbyRestaurantsView.as_view(), name='restaurants_nearby'),
14 path('restaurants/<int:pk>/', views.RestaurantDetailView.as_view(), name='restaurant_detail'),
15 path('restaurants/<int:pk>/ratings/', views.RestaurantRatingView.as_view(), name='restaurant_ratings'),
16 path('restaurants/<int:pk>/toast-status/', views.RestaurantToastStatusView.as_view(), name='restaurant_toast_status'),
17
18 # Search
19 path('search/places/', views.SearchPlacesView.as_view(), name='search_places'),
20
21 # Utility
22 path('seed/', views.seed_data, name='seed_data'),
23 ]