Closed KYPHI-HQ closed 1 month ago
Seems infeasible. Perhaps try double checking may be some other config issue.
Took the time to reproduce the bug, report it with screenshots ...what is "infeasible" ?
Did you had a look at the screenshots? It's just a case difference ..upper to lowercase
Did you try to use the lowercase word "object" in a URL configuration as shown ?
Did you Try to reproduce it ?
@KYPHI-HQ Did you try this without DRF? objects
is not a keyword afaik I know but its special meaning is assigned at Django layer, not DRF.
I have not tried without DRF (you mean just Django?) since I am developing an API and I have tried following combinations:
not working: DefaultRouter | router.register(r'objects', ObjectViewSet, basename='Object') not working: SimpleRouter | router.register(r'objects', ObjectViewSet, basename='Object') working: DefaultRouter | router.register(r'Objects', ObjectViewSet, basename='Object') working: SimpleRouter | router.register(r'Objects', ObjectViewSet, basename='Object')
there seems to be some issue with the regex combination with lower case word objects
object-list view/api/regex lookup should work......but it is not
api/ ^objects$ [name='object-list']
api/ ^objects\.(?P<format>[a-z0-9]+)/?$ [name='object-list']
api/ ^objects/(?P<pk>[^/.]+)$ [name='object-detail']
api/ ^objects/(?P<pk>[^/.]+)\.(?P<format>[a-z0-9]+)/?$ [name='object-detail']
lowercase objects URL config
Titlecase Objects URL config working
why was this issue closed?
Did you Try to reproduce it ?
Nope. It falls into the category of "doesn't pass a sniff test".
Perfectly possible I'm wrong & you're welcome to make a more compelling case here, perhaps isolate the issue yourself.
I don't know you and I don't owe you my time.
Did you Try to reproduce it ?
I tried and was unable to reproduce on a minimal Django project: https://github.com/browniebroke/drf-object-viewset
Works perfectly fine:
I localized the error, the error occurs when calling the API via Safari browser
the long debug messages gave impression of internal error
no issue when trying to call the API via insomina
or Google Chrome
I don't know if safari browser has secret tabs, but have you tried it? Browsers can also cache internally for things like trailing slashes.
it seems there is a bug or restriction using the word objects in the URL configuration of API as following
updating the code to following: changing the case from objects to Objects will not cause any error longer