Setting up django rest framework

I've set up my Django rest environment and started with my initial tutorial. It works fine but

I get this msg when I run it -

{
    "detail": "Authentication credentials were not provided."
}

      

I have one user that is customizable. Not sure what I am not seeing in the result set. When I go to the shell and try User.objects.all () I see this user.

+3


source to share


1 answer


I apologize if your problem is not that simple, but have you authenticated from your Django site?

Fast way to travel; go to your Django admin console, login and then go to your API.

In older versions of Django, you need to enable the admin console in [project] /settings.py and [project] /urls.py.



https://docs.djangoproject.com/en/1.6/ref/contrib/admin/

Typically, I open separate tabs when I create, and when I first got started with rest_framework, I didn't even realize that the tutorial uses django auth by default until I got to the auth tute part. I felt a little silly, so relieved how well some of the current modern technologies are working these days!

0


source







All Articles