Skip to content

kabilselvam/django-orm-app

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Django ORM Web Application

AIM

To develop a Django application to store and retrieve data from a database using Object Relational Mapping(ORM).

Entity Relationship Diagram

ER

DESIGN STEPS

STEP 1:

Fork and clone the repositary in to your IDE

STEP 2:

Create a django project and an app and a superuser account and run the server

STEP 3:

Modify changes in settings and write your code on models and admin and run the server.

STEP 4:

login in to admin using your superuser account and populate the record.

PROGRAM

from django.db import models
from django.contrib import admin

class Employee (models.Model):
   emp_id=models.CharField(primary_key=True,max_length=4,help_text='Employee ID')
   ename=models.CharField(max_length=50)
   post=models.CharField(max_length=20)
   phonenumber=models.IntegerField()
   salary=models.IntegerField()

class EmployeeAdmin(admin.ModelAdmin):
    list_display=('emp_id','ename','post','phonenumber','salary')

OUTPUT

SERVER OUTPUT 2 CLIENT OUTPUT Screenshot 2023-04-19 184143

RESULT

Django application to store and retrieve data from a database using Object Relational Mapping(ORM) is created successfully

About

Ex02

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 100.0%