Skip to content

Aakashraj04/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

table

Include your ER diagram here

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 ur code on models and admin and run the server.

STEP 4:

Login in to admin using your superuser account and populate the records.

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

output2

Verifying Primary-Key

Screenshot 2023-04-06 090423

Server Output

Ex-2 server output

RESULT

Thus we developed a Django application to store and retrieve data from a database using Object Relational Mapping(ORM).

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 100.0%