SchoolTypeList, StateList, SubjectList, UploadVerificationView) app_name = 'account' urlpatterns = [ path('states/', StateList.as_view()), path('subjects/', SubjectList.as_view()), path('schooltypes/', SchoolTypeList.as_view()), path('schooldata/', SchoolDataList.as_view()), path('schooldata/<int:school_type>/', SchoolDataList.as_view()), path('users/<uuid:uuid>/', CustomUserView.as_view(), name="user_view"), path('current/', CurrentUserView.as_view({ 'get': 'retrieve', 'put': 'update', 'patch': 'partial_update', 'delete': 'destroy' }), name="account_view"), path('create/', CustomUserCreateView.as_view(), name="account_create"), path('email/verify/<uuid:token>/', views.verify_email, name="email_verify"), path('email/resend_verification/', views.resend_verification), path('request-password-reset/', views.password_reset_request), path('reset-password/<uuid:token>/', views.password_reset_verify), path('login/', LoginView.as_view(), name='knox_login'), path('logout/', knox_views.LogoutView.as_view(), name='knox_logout'), path('logoutall/', knox_views.LogoutAllView.as_view(), name='knox_logoutall'), ]
from django.urls import include, path from rest_framework import routers from account.views import ( NoteViewSet, AdminViewSet, StudentViewSet, ParentViewSet, InstructorViewSet, InstructorAvailabilityViewSet, InstructorOutOfOfficeViewSet, CurrentUserView, ) router = routers.DefaultRouter() router.register(r'admin', AdminViewSet) router.register(r'student', StudentViewSet) router.register(r'parent', ParentViewSet) router.register(r'instructor', InstructorViewSet) router.register(r'instructor-availability', InstructorAvailabilityViewSet) router.register(r'instructor-out-of-office', InstructorOutOfOfficeViewSet) router.register(r'note', NoteViewSet) urlpatterns = [ path(r'user/', CurrentUserView.as_view()), path(r'', include(router.urls)) ]
from django.urls import include, path from rest_framework import routers from account.views import ( NoteViewSet, AdminViewSet, StudentViewSet, ParentViewSet, InstructorViewSet, InstructorAvailabilityViewSet, InstructorOutOfOfficeViewSet, CurrentUserView, ) router = routers.DefaultRouter() router.register(r"admin", AdminViewSet) router.register(r"student", StudentViewSet) router.register(r"parent", ParentViewSet) router.register(r"instructor", InstructorViewSet) router.register(r"instructor-availability", InstructorAvailabilityViewSet) router.register(r"instructor-out-of-office", InstructorOutOfOfficeViewSet) router.register(r"note", NoteViewSet) urlpatterns = [ path(r"user/", CurrentUserView.as_view()), path(r"", include(router.urls)), ]
from django.conf.urls import url from account.views import CurrentUserView urlpatterns = [url(r'^user/$', CurrentUserView.as_view())]
from django.urls import path, re_path from rest_framework.urlpatterns import format_suffix_patterns from rest_framework_simplejwt.views import TokenRefreshView, TokenObtainPairView from account.views import UserPost, UserPut, CurrentUserView, reset_password_request, reset_password_confirmed urlpatterns = [ path('', UserPost.as_view(), name='user_post'), path('token/', TokenObtainPairView.as_view(), name='token_obtain_pair'), path('token/refresh/', TokenRefreshView.as_view(), name='token_refresh'), path('<int:pk>/', UserPut.as_view(), name='user_put'), path('user/', CurrentUserView.as_view(), name='current_user'), path('reset_password/', reset_password_request, name='reset_password_request'), re_path( r'auth/reset_password_confirm/(?P<uidb64>[0-9A-Za-z]+)-(?P<token>.+)/', reset_password_confirmed, name='reset_password_confirmed'), ] urlpatterns = format_suffix_patterns(urlpatterns)