This repository has been archived on 2022-09-23. You can view files and clone it, but cannot push or open issues or pull requests.
webdev/website/snippets/urls.py

24 lines
686 B
Python
Raw Normal View History

2022-01-08 00:12:34 +01:00
from django.urls import path
2022-01-08 00:24:32 +01:00
from rest_framework.urlpatterns import format_suffix_patterns
2022-01-08 00:12:34 +01:00
from . import views
urlpatterns = [
2022-01-08 02:19:47 +01:00
path('', views.api_root),
2022-01-08 02:26:58 +01:00
path('snippets/',
views.SnippetList.as_view(),
name='snippet-list'),
path('snippets/<int:pk>/',
views.SnippetDetail.as_view(),
name='snippet-detail'),
path('snippets/<int:pk>/highlight/',
views.SnippetHighlight.as_view(),
name='snippet-highlight'),
path('users/',
views.UserList.as_view(),
name='user-list'),
path('users/<int:pk>/', views.UserDetail.as_view(),
name='user-detail'),
2022-01-08 00:24:32 +01:00
]
urlpatterns = format_suffix_patterns(urlpatterns)