[PYTHON] WEB application development using django-Development environment construction-

Introduction

I challenged a simple voting WEB application tutorial using django, which is one of the WEB application frameworks that is interested in WEB applications and can be easily created.

environment

Prepare the environment (what to install)

--python is premised on installation --Install pip --Install Django --Install virtualenv

Installation

pip installation

――Pip is a tool that makes it easy to install various packages. --Download pip (executed at command prompt, cmd below)

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py

Get-pip.py is stored in the directory where the command is executed. * By default, it is under the user

--Installing pip

python get-pip.py

If "Successfully installed ..." is displayed, the installation is complete.

virtualenv installation

--Virtualenv is software for running virtual environment. This time I'll run Django in a virtual environment. --Install virtualenv

pip install virtualenv

--Create a virtual environment

It can be anywhere, but prepare a "Python" folder in advance. This time, create it directly under the C drive. After creating, move to the directory with cmd.

cd C:\Python

Once moved, create a virtual environment.

virtualenv env1

When the creation is complete, change to the "env1" directory.

cd env1

Once moved, activate the virtual environment.

Scripts/activate

Once enabled, you should see something like this:

(env1) C:\Python\env1>

Django installation

--Install Django.

Make sure that the virtual environment is enabled before executing.

pip install django

If "Successfully installed ..." is displayed, the installation is complete.

--Confirm that Django is installed successfully

pip freeze

The version of Django and other related software will be output as shown below.

asgiref==3.2.10
Django==3.1
pytz==2020.1
sqlparse==0.3.1

--Exit the command prompt After confirming the above, exit the command prompt once.

Disable the virtual environment.

deactivate

Exit the command prompt.

exit

Django operation check

--Confirmation that it works normally (implemented with cmd)

Change to the directory.

cd C:\Python\env1

Once moved, activate the virtual environment. Scripts/activate

Once enabled, put it in interactive mode (interpreter).

python

Once launched, import Django. Type the following commands, and then press Enter line by line.

>import django
>print(django.get_version())

If the Django version is displayed as shown below, the operation check is complete.

3.1

I will use VScode from the next time. WEB application development using django-development 1- ** >>> **

Reference material

Recommended Posts

WEB application development using django-Development environment construction-
WEB application development using django-Development 1-
WEB application development using Django [Django startup]
WEB application development using Django [Application addition]
WEB application development using Django [Model definition]
WEB application development using Django [Initial settings]
WEB application development using Django [Request processing]
WEB application development using Django [Template addition]
Web application created with Python + Flask (using VScode) # 1-Virtual environment construction-
Python development environment construction
python2.7 development environment construction
Web application using Bottle (1)
WEB application development using Django [Admin screen creation]
Django development environment construction memo
Web application development with Flask
Web application made with Python3.4 + Django (Part.1 Environment construction)
[MEMO] [Development environment construction] Python
django project development environment construction
[MEMO] [Development environment construction] wine
Construction of Cortex-M development environment for TOPPERS using Raspberry Pi
Web application development memo in python
[For beginners] Django -Development environment construction-
[Python3] Development environment construction << Windows edition >>
Python development environment construction on macOS
[MEMO] [Development environment construction] Jupyter Notebook
Creating a web application using Flask ①
Using Chainer with CentOS7 [Environment construction]
Emacs Python development environment construction memo
Creating a web application using Flask ③
Ubuntu Desktop 20.04 development environment construction memo
Development environment construction (2020 version, WSL2 + VcXsrv)
Creating a web application using Flask ④
Application development using Azure Machine Learning
Python3.6 environment construction (using Win environment Anaconda)
Development of WEB application using Django [Add data from management screen]
[Google App Engine] Flow from development environment construction to application creation
Mac OS X Mavericks 10.9.5 Development environment construction
Python development environment for macOS using venv 2016
Try using the web application framework Flask
Python3 + venv + VSCode + macOS development environment construction
About the development environment you are using
Application development using SQLite with Django (PTVS)
Mac OS X Yosemite 10.10 Development environment construction
Mac OS X development environment construction memo
Construction of development environment for Choreonoid class
Web application development in Go language_Hands-on day 1
[Python] Web application from 0! Hands-on (0) -Environmental construction-
About Cloud run + Firebase development [Web application development]
Windows + gVim + Poetry python development environment construction
Easy-to-understand explanation of Python Web application (Django) even for beginners (1) [Environment construction]
Django development using virtualenv Procedures from virtual environment construction to new project / new application creation and initial settings
Django environment construction
Environment construction with VSCode + Remote Container (Go / Application)
DeepIE3D environment construction
Linux environment construction
Python environment construction
Until Django application creation by terminal (development environment)
Environment construction (python)
django environment construction
Cloud9 environment construction for developing serverless web applications
Kotlin / Native development environment construction & installation procedure & tutorial