from django.urls import path from post.api.views import (PostListAPIView, PostDetailAPIView, PostUpdateAPIView, PostCreateAPIView) app_name = "post" urlpatterns = [ path('list', PostListAPIView.as_view(), name='list'), path('detail/<slug>', PostDetailAPIView.as_view(), name='detail'), path('update/<slug>', PostUpdateAPIView.as_view(), name='update'), path('create/', PostCreateAPIView.as_view(), name='create'), ]
from django.urls import path, include from django.views.decorators.cache import cache_page from post.api.views import PostListAPIView, PostCreateAPIView, PostUpdateAPIView, PostDetailAPIView, PostDeleteAPIView app_name = "post" urlpatterns = [ path('list/', cache_page(60 * 1)(PostListAPIView.as_view()), name='list'), path('create/', PostCreateAPIView.as_view(), name='create'), path('update/<slug>/', PostUpdateAPIView.as_view(), name='update'), path('detail/<slug>/', PostDetailAPIView.as_view(), name='detail'), path('delete/<slug>/', PostDeleteAPIView.as_view(), name='delete'), ]
from django.urls import path from post.api.views import ( PostListAPIView, PostDetailView, PostDeleteView, PostUpdateView, PostCreateAPIView, ) urlpatterns = [ path('', PostListAPIView.as_view(), name='post-list-api'), path('create/', PostCreateAPIView.as_view(), name='post-create-api'), path('<str:slug>/', PostDetailView.as_view(), name='post-detail-api'), path('<str:slug>/edit/', PostUpdateView.as_view(), name='post-update-api'), path('<str:slug>/delete/', PostDeleteView.as_view(), name='list-delete-api'), ]
from django.urls import path,include from post.api.views import PostListAPIView,PostCreatelAPIView,PostDetailAPIView,PostUpdatelAPIView app_name="post" urlpatterns = [ path("list",PostListAPIView.as_view(),name="list"), path("detail/<slug>",PostDetailAPIView.as_view(),name="detail"), path("update/<slug>",PostUpdatelAPIView.as_view(),name="update"), path("create",PostCreatelAPIView.as_view(),name="create") ]
from django.conf.urls import url from post.api.views import PostListAPIView app_name = 'post' urlpatterns = [ url(r'^index/$', PostListAPIView.as_view(), name='index'), #url(r'^(?P<id>\d+)/$', post_detail, name='detail'), #url(r'^create/$', post_create, name='create'), #url(r'^(?P<id>\d+)/update/$', post_update, name='update'), #url(r'^(?P<id>\d+)/delete/$', post_delete, name='delete'), ]
from django.conf.urls import (include, url, ) from django.contrib import admin from post.api.views import ( PostListAPIView, ) urlpatterns = [ url(r'^$', PostListAPIView.as_view()) ]