A
A
Andrei1penguin12020-09-02 00:38:14
Django
Andrei1penguin1, 2020-09-02 00:38:14

How to fix error when starting Django server?

Good day, when starting the django server, I get the following errors:
ImportError: Could not import 'rest_framework_simplejwt.authentication.JWTAuthenticaiton' for API setting 'DEFAULT_AUTHENTICATION_CLASSES'. ImportError: Module "rest_framework_simplejwt.authentication" does not define a "JWTAuthenticaiton" attribute/class.
I'm new to django, don't really understand what django is complaining about

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey Tikhonov, 2020-09-11
@tumbler

The class is called JWTAuthentication. You have a typo.

S
SaM1808, 2020-09-02
@SaM1808

Hello,
Well, it looks like they didn't install django rest framework since it can't import it ( https://pypi.org/project/djangorestframework/ )
You need to
pip install djangorestframework

P
Pavel Shinyaev, 2020-09-03
@Shpawel

Apparently you want to use jwt tokens for authorization. You also need to install the djangorestframework-simplejwt package

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question