Example #1
0
from django.conf.urls import url
from django.views.decorators.csrf import csrf_exempt
from api.views import DetailUpdateDelete

urlpatterns = [
    url(r'^movies/$', 'api.views.list_create_view'),
    url(r'^movies/(?P<movie_id>[0-9]+)/',
        csrf_exempt(DetailUpdateDelete.as_view()))
]
Example #2
0
from django.conf.urls import url
from api.views import ListOrCreateMovie, DetailUpdateDelete

urlpatterns = [
    url(r'^movies/$', ListOrCreateMovie.as_view()),
    url(r'^movies/(?P<pk>[0-9]+)', DetailUpdateDelete.as_view()),
]