Skip to content

Instantly share code, notes, and snippets.

@luiscberrocal
Last active January 23, 2019 15:53
Show Gist options
  • Save luiscberrocal/fe1b40649c5e1d128b55ce2849909ac1 to your computer and use it in GitHub Desktop.
Save luiscberrocal/fe1b40649c5e1d128b55ce2849909ac1 to your computer and use it in GitHub Desktop.
urlpatterns = [
url(r'^$', $MODEL$ListAPIView.as_view(), name='list-$MODEL_LOWER$'),
url(r'^$MODEL_LOWER$/create/$', $MODEL$CreateAPIView.as_view(), name='create-$MODEL_LOWER$'),
url(r'^$MODEL_LOWER$/update/(?P<pk>\d+)/$', $MODEL$DetailAPIView.as_view(), name='update-$MODEL_LOWER$'),
url(r'^$MODEL_LOWER$/delete/(?P<pk>\d+)/$', $MODEL$DetailAPIView.as_view(), name='delete-$MODEL_LOWER$'),
url(r'^$MODEL_LOWER$/(?P<pk>\d+)/$', $MODEL$DetailAPIView.as_view(), name='detail-$MODEL_LOWER$'),
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment