Gautamankul

Rinu Gour, TDS Editors, Aman Kharwal

Hey, folks today we are learning CRUD API using Function-based view and Class-based view in Django REST framework and find some interesting stuff.

Let’s dive in.

Prerequisites

In Django REST API’s common Python packages are required like

Setup

Here…

Rinu Gour, Aman Kharwal, TDS Editors

Hey, developers, today we’re going to learn how to do simple serialization and deserialization of data in the Django REST framework.

We do not require much knowledge like the multi-talented brain prowess of Lucy for serialization in the Django REST framework.

The prerequisites are…

TypeError: Object of type StudentSerialzer is not JSON serializable

Hi developer’s ,Today we are discuss Django big problems ‘TypeError: Object of type StudentSerialzer is not JSON serializable’

Here is my serializers.py file :

And third party app.py :

Answers :

look in serializers.py ,line 26 and 30 .In it replace from this codejdata = JsonRenderer().render(serializer.data ,content_type = 'application/json')

Because when we serialize python complex data then call it in data form .

so new serializers.py will look likt this code

Bye! Hope you will enjoy it …

Rinu Gour

Aman Kharwal

Deserialization in Django RestFramework

Hey, developers, today we’re going to learn how to deserialise in Django REST Framework and deserialization of data in DRF.

Prerequisite

Here, we import the library for deserialization in DRF and insert the data into models (database).

  1. Django
  2. Django REST framework
  3. requests
  4. JSON

Setup

We are using pipenv

How to change your IP address

Hey developer’s today we are going to learn How Change IP Address randomly in Python and also change MAC Address of our Linux system using Python Programming so why waste time let’us do it..

Prerequisite:

  1. Python 3
  2. Ubuntu (any Linux Distro’s)
  3. Module (random ,os,time)

System Setup :

Now,we’re set our…

Hello Developer’ s today we are learn create fake data and know about Fake Library in python3…

Prerequisite:

  1. Python3
  2. Faker library

What is Faker:

Faker is a Python package that generates fake data for you. Whether you need to bootstrap your database, create good-looking XML documents, fill-in your persistence to…

Gautamankul

Software Engineer at Fractal.ai | Entrepreneur

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store