Contenido del Curso
Django REST Framework
1. What is the Rest API ?
4. HTTP Request Methods
Django REST Framework
Get Started
To successfully create a DRF (Django Rest Framework) project, execute the following commands sequentially in the terminal:
If the command above doesn't work, try inputting this pip3 install django
.
If the command above doesn't work, try this pip3 install djangorestframework
.
If the command above doesn't work, try this python3 manage.py startapp main
.
Commands Description
pip install django
: This command installs Django, a web framework for developing web applications using the Python programming language.pip install djangorestframework
: This command installs Django REST framework, an extension for Django that provides tools for developing RESTful APIs in Django-based applications.django-admin startproject shop
: This command creates a new Django project named "shop." A project is the fundamental structure of an application that brings together various components and configurations for web development.cd shop
: This command changes the directory to the "shop" project created with the previous command.python manage.py startapp main
: This command creates a new Django app named "main" within the "shop" project. An app is a standalone component with its own structure and functionality, which can be used for deploying specific features of a web application independently.Django Settings
In Django settings, besides connecting our created app (main
), we must also connect the Rest framework (rest_framework
).
![](https://codefinity-content-media.s3.eu-west-1.amazonaws.com/2094862b-414e-43a2-b303-58f071838bf6/Section+1/14a4fd47-75a9-406b-b37a-3f995a5977a7ConnectApps.jpg)
An example of the connection can be seen in the illustrations above.
¿Todo estuvo claro?
Contenido del Curso
Django REST Framework
1. What is the Rest API ?
4. HTTP Request Methods
Django REST Framework
Get Started
To successfully create a DRF (Django Rest Framework) project, execute the following commands sequentially in the terminal:
If the command above doesn't work, try inputting this pip3 install django
.
If the command above doesn't work, try this pip3 install djangorestframework
.
If the command above doesn't work, try this python3 manage.py startapp main
.
Commands Description
pip install django
: This command installs Django, a web framework for developing web applications using the Python programming language.pip install djangorestframework
: This command installs Django REST framework, an extension for Django that provides tools for developing RESTful APIs in Django-based applications.django-admin startproject shop
: This command creates a new Django project named "shop." A project is the fundamental structure of an application that brings together various components and configurations for web development.cd shop
: This command changes the directory to the "shop" project created with the previous command.python manage.py startapp main
: This command creates a new Django app named "main" within the "shop" project. An app is a standalone component with its own structure and functionality, which can be used for deploying specific features of a web application independently.Django Settings
In Django settings, besides connecting our created app (main
), we must also connect the Rest framework (rest_framework
).
![](https://codefinity-content-media.s3.eu-west-1.amazonaws.com/2094862b-414e-43a2-b303-58f071838bf6/Section+1/14a4fd47-75a9-406b-b37a-3f995a5977a7ConnectApps.jpg)
An example of the connection can be seen in the illustrations above.
¿Todo estuvo claro?