Installation of Anaconda https://www.anaconda.com/
After installing Anaconda, open Anaconda Navigator
Select "Environments" from the menu on the left of Anaconda Navigator and create a directory with Create. (This time, we will proceed as "my app".)
After creating myapp, click "▶" and select "Open Terminal".
(myapp) C:\Users\yourname>
If cmd.exe can be started in this state, execute the following command to install Django.
pip3 install django
Once you've installed Django with pip, run the following command to create your application.
django-admin startproject [your-app-name]
This command creates a directory for your Django application.
(myapp) C:\Users\yourname>django-admin startproject mydjangoapp_web
If you execute the django-admin
command in the above state, a directory called mydjangoapp_web
will be created directly under C: \ Users \ yourname
, so the directory you want to create the folder as appropriate. To move to.
File | Contents |
---|---|
__init__.py | A script file that performs initialization when running a Django project |
settings.py | A file that describes the project setting information |
urls.py | File that manages the URL (address when accessing on the Web) used in the project |
wsgi.py | The main program part of the web application |
Execute the following command with cmd.exe started from Anaconda Navigator
python manage.py runserver
After executing the above command, access localhost: 8000
with an internet browser. Press Ctrl
+ C
to shut down the local server.
--Python Django Super Primer [1st Edition, 1st Edition], Yano Palm Tatsu, 2018-06-15
Recommended Posts