예제 #1
0
# Invitation endpoints
router.register('invitations', InvitationsViewSet)
router.register('invitations', InvitationAcceptViewSet)

# Feedback endpoints
router.register('feedback', FeedbackViewSet)

router.register('unsubscribe', UnsubscribeViewSet, basename='unsubscribe')

urlpatterns = [
    path('api/auth/token/', obtain_auth_token),
    path('api/auth/logout/', LogoutView.as_view()),
    path('api/auth/user/', AuthUserView.as_view()),
    path('api/auth/user/request_delete/', RequestDeleteUserView.as_view()),
    path('api/auth/user/failed_email_deliveries/',
         FailedEmailDeliveryView.as_view()),
    path('api/auth/email/', ChangeMailView.as_view()),
    path('api/auth/email/verify/', VerifyMailView.as_view()),
    path('api/auth/email/resend_verification_code/',
         ResendMailVerificationCodeView.as_view()),
    path('api/auth/password/', ChangePasswordView.as_view()),
    path('api/auth/password/request_reset/',
         RequestResetPasswordView.as_view()),
    path('api/auth/password/reset/', ResetPasswordView.as_view()),
    path('api/unsubscribe/<token>/', TokenUnsubscribeView.as_view()),
    path('api/auth/', AuthView.as_view()),
    path('api/', include((router.urls))),
    path('api-auth/', include('rest_framework.urls',
                              namespace='rest_framework')),
    path('admin/docs/', include('django.contrib.admindocs.urls')),
    path('admin/', admin.site.urls),
예제 #2
0
# History endpoints
router.register('history', HistoryViewSet)

# Invitation endpoints
router.register('invitations', InvitationsViewSet)
router.register('invitations', InvitationAcceptViewSet)

# Feedback endpoints
router.register('feedback', FeedbackViewSet)

urlpatterns = [
    path('api/auth/token/', obtain_auth_token),
    path('api/auth/logout/', LogoutView.as_view()),
    path('api/auth/user/', AuthUserView.as_view()),
    path('api/auth/user/request_delete/', RequestDeleteUserView.as_view()),
    path('api/auth/user/failed_email_deliveries/', FailedEmailDeliveryView.as_view()),
    path('api/auth/email/', ChangeMailView.as_view()),
    path('api/auth/email/verify/', VerifyMailView.as_view()),
    path('api/auth/email/resend_verification_code/', ResendMailVerificationCodeView.as_view()),
    path('api/auth/password/', ChangePasswordView.as_view()),
    path('api/auth/password/request_reset/', RequestResetPasswordView.as_view()),
    path('api/auth/password/reset/', ResetPasswordView.as_view()),
    path('api/webhooks/incoming_email/', IncomingEmailView.as_view()),
    path('api/webhooks/email_event/', EmailEventView.as_view()),
    path('api/unsubscribe/<token>/', UnsubscribeView.as_view()),
    path('api/auth/', AuthView.as_view()),
    path('api/', include((router.urls))),
    path('api-auth/', include('rest_framework.urls', namespace='rest_framework')),
    path('admin/docs/', include('django.contrib.admindocs.urls')),
    path('admin/', admin.site.urls),
    path('docs/', get_swagger_view()),