from django.urls import path from django.conf.urls import include from rest_framework import routers from api.views import TaskViewSet, CreateUserView, TaskListView, TaskRetrieveView, \ PostListView, PostRetrieveView router = routers.DefaultRouter() router.register('tasks', TaskViewSet, basename='tasks') urlpatterns = [ path('list-post/', PostListView.as_view(), name='list-post'), path('detail-post/<str:pk>/', PostRetrieveView.as_view(), name='detail-post'), path('list-task/', TaskListView.as_view(), name='list-task'), path('detail-task/<str:pk>/', TaskRetrieveView.as_view(), name='detail-task'), path('register/', CreateUserView.as_view(), name='register'), path('auth/', include('djoser.urls.jwt')), path('', include(router.urls)), ]
from django.urls import path from api.views import PostListView __author__ = 'Ashraful' urlpatterns = [ path('posts/', PostListView.as_view(), name='post-list-view'), ]
from django.urls import path from django.conf.urls import include from rest_framework import routers from api.views import TaskViewSet, CreateUserView, TaskListView, TaskRetrieveView, PostListView, PostRetrieveView router = routers.DefaultRouter() router.register('tasks', TaskViewSet, basename='tasks') urlpatterns = [ path('list-post/', PostListView.as_view(), name="list-post"), path('detail-post/<str:pk>/', PostRetrieveView.as_view(), name="detail-post"), path('list-task/', TaskListView.as_view(), name='list-task'), path('detail-task/<str:pk>/', TaskRetrieveView.as_view(), name='detail-task'), path('register/', CreateUserView.as_view(), name='register'), path('auth/', include('djoser.urls.jwt')), path('', include(router.urls)), ]
from django.urls import path from api.views import (PostView, PostListView, PostUpdateView, PostDeleteView, PostDetailView, PostPublish, add_comment_to_post, comment_approve, comment_remove, commentList, SignupView, LoginView) urlpatterns = [ path('Register/', SignupView.as_view()), path('Login/', LoginView.as_view()), path('newpost/', PostView.as_view()), path('Listpost/', PostListView.as_view()), path('post_update/<int:pk>/', PostUpdateView.as_view()), path('post_delete/<int:pk>/', PostDeleteView.as_view()), path('post_detail/<int:pk>/', PostDetailView.as_view()), path('post_publish/<int:pk>/', PostPublish.as_view()), path('add_comment/', add_comment_to_post.as_view()), path('comment_list/', commentList.as_view()), path('comment_approve/<int:pk>/', comment_approve.as_view()), path('comment_remove/<int:pk>/', comment_remove.as_view()), ]
from django.urls import path from django.conf.urls import include from rest_framework import routers from api.views import TaskViewSets, CreateUserView, TaskListView, TaskRetriveView, PostListView, PostRetriveView router = routers.DefaultRouter() router.register("tasks", TaskViewSets, basename="tasks") urlpatterns = [ path("list-post/", PostListView.as_view(), name="list-post"), path("detail-post/<str:pk>/", PostRetriveView.as_view(), name="detail-post"), path("list-task/", TaskListView.as_view(), name="list-task"), path("detail-task/<str:pk>/", TaskRetriveView.as_view(), name="detail-task"), path("register/", CreateUserView.as_view(), name="register"), path("auth/", include("djoser.urls.jwt")), path("", include(router.urls)), ]
from django.urls import path from api.views import (tag_post, post, post_html, PostListView, PostDetailView, TagDetailView, TagListView, PostCreateView, TagCreateView, post_detail, tag_html, tag_post_html, post_form, tag_form, post_delete, tag_delete, post_author) app_name = "api" urlpatterns = [ path("api1/tags/", TagListView.as_view()), path("api1/tag/<int:tag_id>", TagDetailView.as_view()), path("api1/posts/", PostListView.as_view()), path("api1/post/<int:post_id>", PostDetailView.as_view()), path("api1/post_create/", PostCreateView.as_view()), path("api1/tag_create/", TagCreateView.as_view()), path("post_detail/<int:post_id>", post_detail, name="post_detail"), path("tag_post/<int:tag_id>", tag_post), path("post_html/", post_html, name="post_html"), path("tag_html/", tag_html), path("tag_post_html/<int:tag_id>", tag_post_html), path("post_form/", post_form, name="form_html"), path("tag_form/", tag_form, name="tag_html"), path("post_delete/<int:post_id>", post_delete, name="post_delete"), path("tag_delete/<int:tag_id>", tag_delete), path("post_author/", post_author, name="post_author") ]