Django Rest Framework - Authentication credentials were not provided

前端 未结 12 1683
野性不改
野性不改 2020-12-04 07:12

I\'m developing an API using Django Rest Framework. I\'m trying to list or create an \"Order\" object, but when i\'m trying to access the console gives me this error:

<
12条回答
  •  一整个雨季
    2020-12-04 08:13

    This help me out without "DEFAULT_PERMISSION_CLASSES" in my settings.py

    REST_FRAMEWORK = {
        'DEFAULT_AUTHENTICATION_CLASSES': (
            'rest_framework.authentication.TokenAuthentication',
            'rest_framework.authentication.SessionAuthentication',
        ),
        'PAGE_SIZE': 10
    }
    

提交回复
热议问题