16 lines
502 B
Python
16 lines
502 B
Python
from django.urls import path, include
|
|||
|
|
from rest_framework.routers import DefaultRouter
|
||
|
|
from . import views
|
||
|
|
|
||
|
|
router = DefaultRouter()
|
||
|
|
router.register(r'categories', views.DishCategoryViewSet)
|
||
|
|
router.register(r'dishes', views.DishViewSet)
|
||
|
|
router.register(r'orders', views.OrderViewSet)
|
||
|
|
|
||
|
|
urlpatterns = [
|
||
|
|
path('', views.index, name='index'),
|
||
|
|
path('api/', include(router.urls)),
|
||
|
|
path('api/parse-url/', views.ParseUrlView.as_view()),
|
||
|
|
path('api/upload/', views.upload_image, name='upload'),
|
||
|
|
]
|