We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b94fd13 commit 6c9d8cfCopy full SHA for 6c9d8cf
movies/urls.py
@@ -1,14 +1,13 @@
1
-from django.conf.urls import url
+from django.urls import include, path, re_path
2
from . import views
3
4
5
urlpatterns = [
6
- url(r'^api/v1/movies/(?P<pk>[0-9]+)$', # urls with details i.e /movies/(1-9)
+ re_path(r'^api/v1/movies/(?P<pk>[0-9]+)$', # Url to get update or delete a movie
7
views.get_delete_update_movie.as_view(),
8
name='get_delete_update_movie'
9
),
10
- url(
11
- r'^api/v1/movies/$', # urls list all and create new one
+ path('api/v1/movies/', # urls list all and create new one
12
views.get_post_movies.as_view(),
13
name='get_post_movies'
14
)
0 commit comments