Developing your APIs in Django REST Framework

  • Each model is a Python class that subclasses django.db.models.Model.
  • Each attribute of the model represents a database field.
  • With all of this, Django gives you an automatically-generated database-access API
  1. employees1 takes all the objects of employees from models (from . models import employees)
  2. Serializer is a variable to which the return value of employeeSerializer is passed
  3. Thus to serializer, model values of firstname and lastname are passed as a dictionary

--

--

--

Building: Ignite Tournaments / Former: DeFi Alliance, Persistence, Eth India Co

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

MS Excel: Concatenate with space between two or more texts

She dwelt among the untrodden trails!

Using MassTransit to manage message queues

Time to “Hello, World”: running Node.js on VMs, Containers, Apps, and Functions — Part 3

Hosting Provider

Hosting Provider  - 19

The Importance Of Making A Meme For Your Next Talk

Leveling Up My Programming Skills

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
Abhinav Srivastava

Abhinav Srivastava

Building: Ignite Tournaments / Former: DeFi Alliance, Persistence, Eth India Co

More from Medium

Introduction to Django Framework

introduction to Django Framework

Introduction to Django

Django Models Create Bidirectional One To Many Relationship

A Guide to OAuth2.0 Authorization with Django Rest Framework.