[PYTHON] Django installation and operation check

Trigger

I haven't programmed at work or at home recently, so I felt a little crisis, so I couldn't study or rehabilitate. I decided to give Django a try.

environment

About the procedure

It was done by referring to Django's Documentation.

Installation

Installation is completed by executing the following command.

dos


python -m pip install Django

Check once the installation is complete. Execute the following on the python command line.

pythoncmd


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

If the result of print (django.get_version ()) shows the version of Django such as 3.0.1, it's OK.

Demo app creation

At the command prompt, change to the directory where you want to create the app. Then execute the following command.

cmd


django-admin startproject <app name>

Enter any app name for <app name>.

At the command prompt, a directory with <app name> will be created in the current directory, so move to that directory. After moving, execute the following command.

cmd


python manage.py runserver

Then the server will start, so open a browser and access http://127.0.0.1:8000. Success if you can access it safely. The screen shown below is displayed.

The command prompt looks like the figure below.

that's all.

By the way, this server is prepared for development, so it seems that it should not be used in production operation. (Document talk)

Finally

I created a demo app, but I didn't code it because I didn't change anything from the automatically created code. I'm going to do it now, I'll heal. : rolling_eyes:

The article is messy because the time is a little late. I have to make it a little easier to understand. : weary: → 2019/12/28 I added a screen because the operation check part was rough. : muscle:

Recommended Posts

Django installation and operation check
Django input check and calendar input
Django installation
Django version check
Elasticsearch installation and basic operation for ubuntu
Put Tkinter in Macbook and check operation
django installation location
From ROS for Windows installation to operation check
jupyter and pandas installation
Django --models.py and admin.py
Install Python 3.7 and Django 3.0 (CentOS)
Scrapy installation troubles and solutions
django timezone and language settings
Create and list Django models
Tomcat installation and autostart settings
Source installation and installation of Python
Organize [Django] commands and roles
Django PostgreSQL installation, database construction
Python (Python 3.7.7) installation and basic grammar
Python-Mouse and keyboard operation with pyautogui
[Note] Django project creation and terminology
Python practice_Virtual environment setup ~ Django installation
HTTPS with Django and Let's Encrypt
[python] week1-3: Number type and operation
Mavericks and PIL installation is missing
Check and move directories in Python
[Linux] File and directory operation commands
Installation and easy usage of pytest
PySpark 1.5.2 + Elasticsearch 2.1.0 Installation procedure and execution
Homebrew and Pycharm installation instructions notes
pynq-z1 From purchase to operation check