I've summarized the process of getting Django to work on Windows 10.
environment: PC:windows 10 64bit python 3.8.5 virtualenv 20.0.30 Text editor Atom
Proceed as if python and virtualenv are installed.
I referred to here for the installation of virtualenv. I was having a hard time because I couldn't activate the command even though I was operating the command as described in the article. ・ Https://qiita.com/th1209/items/84f21a4499548b34ec91 ・ Https://qiita.com/wau/items/bc80859cf27307572fcd ・ Https://python.keicode.com/devenv/virtualenv.php
Now that I'm going to add Django, I read this and proceeded. ・ Https://tane-no-blog.com/709/
But after installing Django I had a problem. Create a virtual file called env1 and start a project called app1 in it. As mentioned in the article, django-admin startproject app1 I got an error when I ran.
I wondered if the command is different in windows I tried the article "In windows, django-admin.py passes".
After all it cannot be done. After that, I found an article that "An error occurs if the path does not pass", so I added the following two lines to the system environment variables.
I searched for the location of django-admin.py and set the path. However, I could not proceed due to an error again.
Then I tried some commands. py -m startproject mysite
App1 has changed to mysite when I noticed it while I was looking at the site, so please go through.
I can't pass ...
I changed py to python and tried it.
I passed! On my computer python -m startproject mysite Was the path to create the project.
For confirmation, I used python manage.py runserver to start the server and check if the page can be opened.
After the command prompt becomes the above screen In your browser http://127.0.0.1:8000/ I accessed.
I had a hard time getting the pass
Recommended Posts