iMerica / dj-rest-auth

Authentication for Django Rest Framework
https://dj-rest-auth.readthedocs.io/en/latest/index.html
MIT License
1.64k stars 306 forks source link

ModuleNotFoundError: No module named 'dj_rest_authdjango' #449

Open blue-foot-xy opened 1 year ago

blue-foot-xy commented 1 year ago

I exactly followed the instructions to enable registration, under Registration(optional), from the docs: https://dj-rest-auth.readthedocs.io/en/latest/installation.html. But then immediately I got the following error:

Traceback (most recent call last):
  File "manage.py", line 22, in <module>
    main()
  File "manage.py", line 18, in main
    execute_from_command_line(sys.argv)
  File "C:\Users\user\AppData\Local\Programs\Python\Python38\lib\site-packages\django\core\management\__init__.py", line 446, in execute_from_command_line
    utility.execute()
  File "C:\Users\user\AppData\Local\Programs\Python\Python38\lib\site-packages\django\core\management\__init__.py", line 420, in execute
    django.setup()
  File "C:\Users\user\AppData\Local\Programs\Python\Python38\lib\site-packages\django\__init__.py", line 24, in 
setup
    apps.populate(settings.INSTALLED_APPS)
  File "C:\Users\user\AppData\Local\Programs\Python\Python38\lib\site-packages\django\apps\registry.py", line 91, in populate
    app_config = AppConfig.create(entry)
  File "C:\Users\user\AppData\Local\Programs\Python\Python38\lib\site-packages\django\apps\config.py", line 228, in create
    import_module(entry)
  File "C:\Users\user\AppData\Local\Programs\Python\Python38\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'dj_rest_authdjango'

How do I solve this issue?

jerinpetergeorge commented 1 year ago

Most probably, you migth have missed adding a "," (comma) after dj_rest_auth

INSTALLED_APPS = [
# other apps,
"dj_rest_auth",
# other apps if any
]
bulleeyu commented 2 months ago

Thank you, I missed a comma after "dj_rest_auth" either...... @jerinpetergeorge