[PYTHON] WEB application development using Django [Django startup]

Premise / Environment

MacbookPro2017 13inch macOS Catalina 10.15.6 Python 3.6 Djanngo version 3.1.1 ← I forgot to write the installation procedure. I may write it soon.

Create a project and check the file structure

This time, create a django folder and create a project in it. Enter the following at the command prompt.

$ mkdir django
$ cd django

After moving to the "django" folder, enter the following to create the project. This time, the project name is "project1".

$ django-admin startproject project1

After execution, move to the created project1 folder and check the file.

$ cd project1
$ ls
manage.py	project1

In addition, go to the project1 folder inside the project1 folder and check the files.

$ cd project1
$ ls
__init__.py 	asgi.py		settings.py	urls.py		wsgi.py

After confirming that the above files have been created, go back to the folder above and start the Django server and check the operation.

$ cd ..
$ python3.6 manage.py runserver

Watching for file changes with StatReloader
Performing system checks...

System check identified no issues (0 silenced).

You have 18 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions.
Run 'python manage.py migrate' to apply them.
September 13, 2020 - 07:31:30
Django version 3.1.1, using settings 'project1.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.

When the server can be started, enter "http://127.0.0.1:8000/" in the browser. If you see an image of the rocket and the words "The install worked successfully! Congratulations!", You are successful. screencapture-127-0-0-1-8000-2020-09-13-17_02_45.png

After confirming the operation, you can stop the server by pressing Control + C at the command prompt.

Initial setting

Recommended Posts

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 development using django-Development 1-
WEB application development using Django [Admin screen creation]
WEB application development using django-Development environment construction-
Application development using SQLite with Django (PTVS)
Web application using Bottle (1)
Development of WEB application using Django [Add data from management screen]
Web application development with Flask
Web application creation with Django
(Python) Try to develop a web application using Django
Creating a web application using Flask ②
Web application development memo in python
Build a web application with Django
Creating a web application using Flask ①
Creating a web application using Flask ③
Creating a web application using Flask ④
Application development using Azure Machine Learning
Django startup
Try using the web application framework Flask
Web application development in Go language_Hands-on day 1
About Cloud run + Firebase development [Web application development]
I made a WEB application with Django
Try using the Python web framework Django (1)-From installation to server startup
First Django development
How to build an application from the cloud using the Django web framework
Until Django application creation by terminal (development environment)
Development digest with Django
Django python web framework
Build a Django development environment using pyenv-virtualenv on Mac
Web application made with Python3.4 + Django (Part.1 Environment construction)
Try using Django templates.html
Tech-Circle Let's start application development using machine learning (self-study)
[Memo] Django development environment
Prepare Django development environment using homebrew on MacOSX Mavericks (10.9)
Try using the Python web framework Django (2) --Look at setting.py
Django development environment construction memo
[Django] Notes on using django-debug-toolbar
DEBUG settings when using Django
Django environment development on Windows 10
Web scraping using Selenium (Python)
Web scraping using AWS lambda
Rename an existing Django application
Web application with Python + Flask ② ③
Real-time web with Django Channels
[Remote development] Control application (Practice 2)
django project development environment construction
Web application with Python + Flask ④
Text development using Mac services
If you know Python, you can make a web application with Django
Web application created with Python + Flask (using VScode) # 1-Virtual environment construction-
Web App Development Practice: Create a Shift Creation Page with Django! (Shift creation page)
About HTTP cache when developing REST API-based web application [using GCP]
The road to web application development is a long way off
Launched a web application on AWS with django and changed jobs
Django development using virtualenv Procedures from virtual environment construction to new project / new application creation and initial settings