To develop a Django application to store and retrieve data from a database using Object Relational Mapping(ORM).
Include your ER diagram here
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
admin.py
from django.contrib import admin
from .models import Employee,EmployeeAdmin
admin.site.register(Employee,EmployeeAdmin)
models.py
from django.db import models
from django.contrib import admin
class Employee(models.Model):
empid=models.IntegerField()
empname=models.CharField(max_length=20)
dept=models.CharField(max_length=10)
salary=models.FloatField()
class EmployeeAdmin(admin.ModelAdmin):
list_display=('empid','empname','dept','salary')
Thus the program for creating a database using ORM hass been executed successfully
