To develop a Django application to store and retrieve data from a Book database using Object Relational Mapping(ORM).
Clone the problem from GitHub
Create a new app in Django project
Enter the code for admin.py and models.py
Execute Django admin and create details for 10 books
from django.db import models
from django.contrib import admin
class Book(models.Model
SNO=models.IntegerField()
NAME=models.CharField(max_length=100)
PRICE=models.IntegerField()
AUTHOR=models.CharField(max_length=100)
class BookAdmin(admin.ModelAdmin):
list_display=('SNO','NAME','PRICE','AUTHOR')
Thus the program for creating a database using ORM hass been executed successfully