Reputation: 55
I am trying to access:
http://127.0.0.1:8000/admin/login/?next=/admin/
but I am shown with this error:
'''
ModuleNotFoundError at /admin/login/
No module named 'path'
Request Method: GET
Request URL: http://127.0.0.1:8000/admin/login/?next=/admin/
Django Version: 4.2.5
Exception Type: ModuleNotFoundError
Exception Value:
No module named 'path'
Exception Location: , line 1004, in _find_and_load_unlocked
Raised during: django.contrib.admin.sites.login
Python Executable: C:\Program Files\Python310\python.exe
Python Version: 3.10.6
Python Path:
['C:\Users\ROHIT\Documents\Project\hospital2\hospital_project',
'C:\Program Files\Python310\python310.zip',
'C:\Program Files\Python310\DLLs',
'C:\Program Files\Python310\lib',
'C:\Program Files\Python310',
'C:\Users\ROHIT\AppData\Roaming\Python\Python310\site-packages',
'C:\Users\ROHIT\AppData\Roaming\Python\Python310\site-packages\win32',
'C:\Users\ROHIT\AppData\Roaming\Python\Python310\site-packages\win32\lib',
'C:\Users\ROHIT\AppData\Roaming\Python\Python310\site-packages\Pythonwin',
'C:\Program Files\Python310\lib\site-packages']
Server time: Sun, 10 Sep 2023 08:21:55 +0000
'''
I have included from django.urls import path in all the urls.py
Upvotes: 0
Views: 203
Reputation: 11
Firstly, Are you sure that the path function is imported correctly? Did you check for spelling errors? If you are using a virtual environment check out if it is activated. Secondly, Some extra information would be better to pinpoint the problem accurately. It would be helpful if you could provide the urls.py file to check it out.
Upvotes: 0