Skip to content

SABARI005/django-orm-app

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 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

WhatsApp Image 2022-12-18 at 21 09 05

DESIGN STEPS

STEP 1:

Create a new django project using "django-admin startproject",get into the project's terminal and use "python3 manage.py startapp" command.

STEP 2:

Define a model for the cricketers_details in the models.py and allow host access and add the app name under installed apps in settings.py

STEP 3:

Register the models with the Django admin side.In admin.py under app folder,register the models with Django admin site.

PROGRAM

from django.db import models
from django.contrib import admin
# Create your models here.
class cricketers_details(models.Model):
    cricketersname= models.CharField(max_length=100)
    age = models.IntegerField()
    jerseyno = models.IntegerField(primary_key = True)
    teamname = models.CharField(max_length=200)
    totalruns=models.IntegerField()


class cricketers_detailsAdmin(admin.ModelAdmin):
    list_display = ('cricketersname','age','jerseyno','teamname','totalruns')

OUTPUT

###admin output

WhatsApp Image 2022-12-18 at 21 09 06

RESULT

the program is executed successfully

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 100.0%