Posts Tagged with 'DRF'

A Delete API allows clients to remove an existing resource from the database. In RESTful design, this corresponds to the DELETE HTTP method. In this guide, you’ll learn how to build a DELETE /books/<id>/ endpoint …

Last updated 5 months, 2 weeks ago | 443 views

Tags:- Python Django DRF

An Update API allows clients to modify an existing resource in the database. In RESTful APIs, this usually corresponds to a PUT or PATCH request. In this guide, we’ll walk through how to create an …

Last updated 5 months, 2 weeks ago | 430 views

Tags:- Python Django DRF

A Retrieve API is used to fetch a single record from the database using its unique identifier (usually id). It is one of the key components of a RESTful API. In this article, we’ll build …

Last updated 5 months, 2 weeks ago | 407 views

Tags:- Python Django DRF

A Create API allows clients to send data to the server to create a new resource in the database. In RESTful terms, this usually maps to a POST request. In this guide, we’ll walk through …

Last updated 5 months, 2 weeks ago | 435 views

Tags:- Python Django DRF

A List API is the foundation of any RESTful service—it allows clients to retrieve collections of data, such as a list of books, users, or products. In this tutorial, you’ll learn how to create a …

Last updated 5 months, 2 weeks ago | 402 views

Tags:- Python Django DRF

Django REST Framework’s ViewSet classes handle the standard CRUD operations well. But what if you need to implement custom logic—like publishing a blog post, marking an item as featured, or resetting a password? That's where …

Last updated 5 months, 2 weeks ago | 555 views

Tags:- Python Django DRF

In Django REST Framework, organizing your API routes efficiently is essential for maintainable and scalable projects. One of the best ways to handle API routing is through routers, which work hand-in-hand with ViewSets to automatically …

Last updated 5 months, 2 weeks ago | 409 views

Tags:- Python Django DRF

Manually defining URL patterns for every view in your API can get repetitive and error-prone. That’s why Django REST Framework offers routers—a powerful way to automatically generate URL patterns for your ViewSets. In this article, …

Last updated 5 months, 2 weeks ago | 439 views

Tags:- Python Django DRF

In Django REST Framework, sometimes you want to expose data to be read, but not allow it to be modified. For such cases, ReadOnlyModelViewSet is the perfect tool. This article covers: What ReadOnlyModelViewSet is When …

Last updated 5 months, 2 weeks ago | 443 views

Tags:- Python Django DRF

In Django REST Framework, building RESTful APIs can be done manually or with the help of powerful abstractions. One of the most convenient tools in DRF is the ModelViewSet — a class that automatically provides …

Last updated 5 months, 2 weeks ago | 478 views

Tags:- Python Django DRF

In a RESTful API, how you respond to a client is just as important as what you respond with. In Django REST Framework (DRF), the Response class and HTTP status codes are essential tools for …

Last updated 5 months, 3 weeks ago | 302 views

Tags:- Python Django DRF

When building RESTful APIs, understanding how to manually handle HTTP methods like GET, POST, PUT, and DELETE is essential. While Django REST Framework (DRF) provides powerful abstractions like ModelViewSet, sometimes you need more control — …

Last updated 5 months, 3 weeks ago | 500 views

Tags:- Python Django DRF

In Django, views are a core part of the Model-View-Template (MVT) architecture. A view takes in a web request and returns a web response. It can access the database, render templates, handle forms, redirect users …

Last updated 5 months, 3 weeks ago | 452 views

Tags:- Python Django DRF

Django REST Framework (DRF) provides several ways to build APIs. Among the most foundational and flexible options is the APIView class. It’s perfect for developers who want full control over request handling without giving up …

Last updated 5 months, 3 weeks ago | 490 views

Tags:- Python Django DRF

When building APIs, it’s common to work with related models — for example, a blog post and its comments, or an order and its items. To represent these relationships properly in your API responses and …

Last updated 5 months, 3 weeks ago | 426 views

Tags:- Python Django DRF