Replies: 3 comments
-
What "error"? Would be helpful if you could share the message and/or trace back |
Beta Was this translation helpful? Give feedback.
-
[2024-04-06 17:26:58][django.utils.autoreload.run_with_reloader():668] [INFO] Watching for file changes with StatReloader |
Beta Was this translation helpful? Give feedback.
-
Yes, that's a protection that was added in 3.15: #8438 You can pass a basename like this:
This basename is used when calling I wonder why you need to register extra URLs as individual views, though. It sounds like you may benefit from viewsets actions instead: https://www.django-rest-framework.org/api-guide/viewsets/#viewset-actions |
Beta Was this translation helpful? Give feedback.
-
In version 3.14, there will be no error, while in version 3.15, this situation will result in an error:
router.register('task', CeleryTaskModelViewSet)
urlpatterns = [
path('task/job_list/', CeleryTaskModelViewSet.as_view({'get': 'job_list'})),
path('task/update_status/str:pk/', CeleryTaskModelViewSet.as_view({'post': 'update_status'})),
path('task/delete_task/str:pk/', CeleryTaskModelViewSet.as_view({'delete': 'destroy'})),
]
urlpatterns += router.urls
Beta Was this translation helpful? Give feedback.
All reactions