from django.urls import path #from news.api.views import article_detail_api_view, article_list_create_api_view from news.api.views import ArticleDetailAPIView, ArticleListCreateAPIView, JournalistListCreateAPIView urlpatterns = [ path("articles/", ArticleListCreateAPIView.as_view(), name="article-list"), path("articles/<int:pk>/", ArticleDetailAPIView.as_view(), name="article-detail"), path("journalists/", JournalistListCreateAPIView.as_view(), name="journalist-list") ]
from django.urls import path from news.api.views import (article_list_create_api_view, ArticleDetailAPIView, article_detail_api_view, ArticleListCreateAPIView, JournalistListCreateAPIView) urlpatterns = [ path('class/articles/', ArticleListCreateAPIView.as_view(), name='class-article-list'), path('class/articles/<int:pk>/', ArticleDetailAPIView.as_view(), name='class-article-detail'), path('articles/', article_list_create_api_view, name='article-list'), path('articles/<int:pk>/', article_detail_api_view, name='article-detail'), path('class/journalists/', JournalistListCreateAPIView.as_view(), name='journalist-list'), ]
from django.urls import path from news.api.views import (article_list_create_api_view, article_detail_api_view) from news.api.views import (ArticleDetailAPIView, ArticleListCreateAPIView) urlpatterns = [ # path('articles/', article_list_create_api_view, name="article-list"), # path('articles/<int:pk>/', article_detail_api_view, name="article-detail") path('articles/',ArticleListCreateAPIView.as_view(), name="article-list"), path('articles/<int:pk>/', ArticleDetailAPIView.as_view(), name="article-detail") ]
from django.urls import path from news.api.views import article_list_create_api_view, \ article_detail_api_view, ArticleListCreateAPIView, ArticleDetailAPIView, \ JournalistListCreateAPIView urlpatterns = [ path('articles/', article_list_create_api_view, name='article_list'), path('articles/<int:pk>', article_detail_api_view, name='article_detail'), path('articles/class/', ArticleListCreateAPIView.as_view(), name='article_list_class'), path('articles/class/<int:pk>', ArticleDetailAPIView.as_view(), name='article_detail_class'), path('journalists/class/', JournalistListCreateAPIView.as_view(), name='journalist_list_class'), ]