Reputation: 85
I installed python 3.6.2 and django 1.11.6. I then added 'pip' and 'django' path inside "PATH" variable in environmental variables in both sections
C:\Users\Moh3n\AppData\Local\Programs\Python\Python36\Scripts C:\Users\Moh3n\AppData\Local\Programs\Python\Python36\Lib\site-packages\django C:\Users\Moh3n\AppData\Local\Programs\Python\Python36\Lib\site-packages
c:\Users\Moh3n\AppData\Local\Programs\Python\Python36\Scripts C:\Users\Moh3n\AppData\Local\Programs\Python\Python36\Lib\site-packages C:\Users\Moh3n\AppData\Local\Programs\Python\Python36\Lib\site-packages\django
Then I created a project with django
and created a simple app named polls
.
In polls/urls.py
I added the import statement from django.urls import path
Then pycharm poped a box saying
unresolved reference 'path'
I didn't pay attention at first and then in mysite/urls.py
added the same import statement.
The same thing happened for include, path
. At the end when I ran server in cmdier with the code
py manage.py runserver
I saw this traceback:
If you could help me to find where the problem is, I'd really appreciate.
Upvotes: 1
Views: 4421
Reputation: 1446
To check for outdated packages using pip type:
pip list --outdated
Then install the latest Django version. (At this time it is 2.0.3). Using this command (altering the version number if needed).
pip install django==2.0.3
This will update your Django installation and allow you to use the latest Django tutorial.
Upvotes: 0