The "root URI" link on https://docs.zoltardata.com/api/ points to https://www.zoltardata.com/api/ , which is a valid endpoint, but which is not returning anything, unlike, say, https://www.zoltardata.com/api/projects/ . The problem seems to be that forecast_app.api_views.api_root() is passed a rest_framework.request.Request object whose user is AnonymousUser, even if the user is logged in, and so returns a HttpResponseForbidden. As opposed to forecast_app.api_views.ProjectList.test_func(), which is passed a WSGIRequest that does have the correct user. The root uri works correctly from zoltpy.
The "root URI" link on https://docs.zoltardata.com/api/ points to https://www.zoltardata.com/api/ , which is a valid endpoint, but which is not returning anything, unlike, say, https://www.zoltardata.com/api/projects/ . The problem seems to be that
forecast_app.api_views.api_root()
is passed arest_framework.request.Request
object whose user isAnonymousUser
, even if the user is logged in, and so returns aHttpResponseForbidden
. As opposed toforecast_app.api_views.ProjectList.test_func()
, which is passed aWSGIRequest
that does have the correct user. The root uri works correctly from zoltpy.