An issue with displaying available endpoints in DRF's default API root view #8879
Unanswered
varnie
asked this question in
Question & Answer
Replies: 1 comment 3 replies
-
can you please check the docs to ensure (?P.+) is needed after router.register(r"access/ ? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello everybody.
I have the following
urls.py
for an app named service where I register API endpoints:Below is my project's
urls.py
where I use it:The APIs themselves are functioning properly, but I am having trouble making them work with DRF's default API root view. The view is displaying an empty list of available endpoints.
I'm not sure, but this issue may be related to the regular expressions I'm using when registering endpoints, such as
r"access/(?P<endpoint>.+)
.The problem disappears if I rewrite it like
router.register(r"access", AccessViewSet, basename="access")
(i.e. I delete that part:(?P<endpoint>.+)
).If this is indeed the problem, how can I resolve it?
I am using:
Thank you for your time.
Beta Was this translation helpful? Give feedback.
All reactions