In api.py of the leads app, in the function
def get_querysetself):
return self.request.user.leads.all()
Then I looked up and found that at the URL '/api/auth/login/', I'm not even getting a form in the API view of the rest framework. So I can't even post on the URL to login. Register is working, it creates users perfectly.
Problem is somewhere in LoginSerializer class.
When I visit '..../api/auth/login/' I get this without a post form.
GET /api/auth/login/
HTTP 401 Unauthorized
Allow: POST, OPTIONS
Content-Type: application/json
Vary: Accept
WWW-Authenticate: Token
{
"detail": "Authentication credentials were not provided."
}
In api.py of the leads app, in the function def get_querysetself): return self.request.user.leads.all()
Then I looked up and found that at the URL '/api/auth/login/', I'm not even getting a form in the API view of the rest framework. So I can't even post on the URL to login. Register is working, it creates users perfectly. Problem is somewhere in LoginSerializer class.
When I visit '..../api/auth/login/' I get this without a post form.
GET /api/auth/login/ HTTP 401 Unauthorized Allow: POST, OPTIONS Content-Type: application/json Vary: Accept WWW-Authenticate: Token
{ "detail": "Authentication credentials were not provided." }