Groups
Sign in
Groups
Django REST framework
Conversations
About
Send feedback
Help
View Url Not displayed in DRF web page
23 views
Skip to first unread message
Mokhtar BEN MESSAOUD
unread,
Jun 6, 2024, 3:47:52 PM
Jun 6
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django REST framework
Hello
I defined a view for Test
class
UserView
(
APIView
):
http_method_names
=
[
'get'
]
def
get
(
self
,
request
):
# Your code to handle the GET request goes here
return
Response
(
"This is a GET request"
)
I added the view in urls.py
urlpatterns
=
[
path
(
''
,
include
(
router
.
urls
)),
path
(
'userinfo/'
,
UserView
.
as_view
(),
name
=
'userinfo'
),
]
when I call the view
http://localhost:8000/schedule/userinfo/
I get teh expected response
but the API is not displayed in API Root
what I missed?
Mokhtar BEN MESSAOUD
unread,
Jun 7, 2024, 2:29:09 PM
Jun 7
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django REST framework
I get the response on
https://stackoverflow.com/questions/28730109/adding-a-apiview-to-django-rest-framework-browsable-api
APIView can not be displayed by Api Root page
Reply all
Reply to author
Forward
0 new messages