diff options
Diffstat (limited to 'apps/notes/urls.py')
-rw-r--r-- | apps/notes/urls.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/apps/notes/urls.py b/apps/notes/urls.py index cbb1884..ccfcc9e 100644 --- a/apps/notes/urls.py +++ b/apps/notes/urls.py @@ -1,17 +1,17 @@ from django.urls import path -from django.conf.urls import include -from rest_framework import routers - -from .views import NoteViewSet, FolderViewSet, NoteListView - -router = routers.DefaultRouter() -router.register(r'notes/folder', FolderViewSet, basename="folder") -router.register(r'notes', NoteViewSet, basename="notes") +from .views import ( + NoteDetailView, + NoteCreateView, + NoteListView, + NoteListRedirectView, +) app_name = "notes" urlpatterns = [ - path(r'', NoteListView.as_view(), name='homepage',), - path(r'', include(router.urls)), + path(r'create/', NoteCreateView.as_view(), name='note-create',), + path(r'<str:user>/<slug>', NoteDetailView.as_view(), name='note-detail',), + path(r'<str:user>/', NoteListView.as_view(), name='note-list',), + path(r'', NoteListRedirectView.as_view(), name='note-redirect',), ] |