Styria-Digital / django-rest-framework-jwt

JSON Web Token Authentication support for Django REST Framework
https://styria-digital.github.io/django-rest-framework-jwt/
MIT License
191 stars 57 forks source link

Problems with Django 4 after install #114

Open kylowrobelek opened 1 year ago

kylowrobelek commented 1 year ago

After installing package (also in INSTALLED APPS) I cant run the project, still getting an error:

env/lib/python3.11/site-packages/rest_framework_jwt/blacklist/models.py", line 10, in from rest_framework_jwt.settings import api_settings ModuleNotFoundError: No module named 'rest_framework_jwt.settings'

mahdiniknejad commented 1 year ago

Check if the package is installed correctly: Make sure that you have installed the "rest_framework_jwt" package correctly. You can check this by running the command "pip list" in your terminal or command prompt to see if the package is listed. If it is not listed, you can try reinstalling the package using the command "pip install rest_framework_jwt".

Check if the module is present in the package: After confirming that the package is installed, you can check if the "rest_framework_jwt.settings" module is present in the package. You can do this by navigating to the package directory and checking if the module is present in the "rest_framework_jwt" directory. If it is not present, you can try reinstalling the package or checking if there is a more recent version of the package available.

Check if the package is added to INSTALLED_APPS: Ensure that you have added the "rest_framework_jwt" package to the INSTALLED_APPS list in your project's settings.py file. If the package is not added to the INSTALLED_APPS list, Django will not be able to find it.

Check if there is a version conflict: Sometimes, there may be a conflict between different versions of packages that you have installed. Check if you have installed multiple versions of the "rest_framework_jwt" package, and if so, try removing any older versions that may be causing a conflict.

Check if you have imported the correct module: Double-check that you are importing the correct module in your code. The error message suggests that the "rest_framework_jwt.settings" module is missing, so make sure that you are importing this module correctly, and not a different module with a similar name.