dsite/recipe/urls.py
Ching 0cd1fd9358 feat(daily recipe detail page): [A] 增加每日菜谱接口及页面展示
[A] 增加每日菜谱接口及页面展示

Signed-off-by: Ching <loooching@gmail.com>
2021-10-04 17:34:16 +08:00

17 lines
613 B
Python

from django.conf.urls import include, url
# from django.core.urlresolvers import reverse
from django.urls import path
from rest_framework import routers
from recipe import views
# Wire up our API using automatic URL routing.
# Additionally, we include login URLs for the browsable API.
urlpatterns = [
url(r'^recipe/(?P<pk>\d+)$', views.RecipeAPI.as_view(), name='recipe-detail'),
url(r'^recipe/$', views.RecipeListAPI.as_view()),
url(r'^week-recipe/$', views.WeekRecipeListAPI.as_view()),
url(r'^daily-recipe/(?P<pk>\d+)$', views.DailyRecipeAPI.as_view(),
name='dailyrecipe-detail'),
]