edit routes

This commit is contained in:
Francesco Esposito 2019-11-23 12:22:24 +01:00
parent ad79a6ce16
commit f8ed0630f2
1 changed files with 5 additions and 4 deletions

View File

@ -1,10 +1,11 @@
from django.urls import path, include
from . import views
prefix = 'v1/'
urlpatterns = [
path('users/', views.UserList.as_view()),
path('users/<int:pk>/', views.UserDetail.as_view()),
path('books/', views.BookList.as_view()),
path('books/<int:pk>/', views.BookDetail.as_view()),
path(prefix + 'users/', views.UserList.as_view()),
path(prefix + 'books/', views.BookList.as_view()),
path(prefix +'books/<int:pk>/', views.BookDetail.as_view()),
path('api-auth/', include('rest_framework.urls'))
]