Skip to content

mohamedazeem33/django-orm-app

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 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).

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 the 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)
   salary=models.IntegerField()


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

OUTPUT

django photo django output photo

RESULT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 100.0%