How to Build a simple REST API using Django

How to Build a simple REST API using Django

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. In this tutorial, you'll see How to Build a simple REST API using Django

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

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Top 10 API Security Threats Every API Team Should Know

Learn what are the most important API security threats engineering leaders should be aware of and steps you can take to prevent them

Consume Web API Post method in ASP NET MVC | Calling Web API | Rest API Bangla Tutorial

LIKE | COMMENT | SHARE | SUBSCRIBE In this tutorial, I will discussed about how to consume Web API Get method and display records in the ASP.NET View. Here, ...

Consume Web API Get method in ASP NET MVC | Calling Web API | Rest API Bangla Tutorial

LIKE | COMMENT | SHARE | SUBSCRIBE In this tutorial, I will discussed about How to Consume Web API Get method in ASP NET MVC. Blog : http://aspdotnetexplorer...

Consume Web API Put method in ASP NET MVC | Calling Web API | Rest API Bangla Tutorial

LIKE | COMMENT | SHARE | SUBSCRIBE In this tutorial, we learned how to consume Web API Get and Post methods in the ASP.NET View. Here, we will see how to con...

Consume Web API Delete Method in ASP NET MVC | Calling Web API | Rest API Bangla Tutorial

LIKE | COMMENT | SHARE | SUBSCRIBE In this tutorial, we learned how to consume Web API Get,Post and PUT methods in the ASP.NET View. Here, we will see how to...