Django is the preferred framework for web development using the Python language. Its developer documentation is complete, with a large number of tools and components, you can quickly create a website, and the currently released version 3.1 fully supports asynchronous.

“Floating Cloud Ranch” photoed by Zosionlee

Create a Django project

Build a website in one second

Enter the following commands in the console to create a website framework

django-admin startproject django2

The directory structure is as follows

F:.
│  manage.py      ## django manage
│  Pipfile
└─django2
   settings.py    ## project config
   urls.py        ## project urls
   wsgi.py        ## wsgi for debug
   __init__.py

If you use tools such as pycharm or vscode to write code, you can configure the settings file mounted when Django starts. Visit 127.0.0.1:8000. When you see the small rocket, it means that Django is successfully started.

## let django know the settings
DJANGO_SETTINGS_MODULE=django2.settings

Image for post

#django #python #api #json-web-token

How to Build a simple REST API using Django
3.55 GEEK