To develop a Django application to store and retrieve data from a Football Players 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 10 Football players
from django.db import models
from django.contrib import admin
# Create your models here.
class Student (models.Model):
referencenumber=models.CharField(max_length=20,help_text="reference number")
name=models.CharField(max_length=100)
age=models.IntegerField()
email=models.EmailField()
class StudentAdmin(admin.ModelAdmin):
list_display=('referencenumber','name','age','email')
from django.contrib import admin
from .models import Student,StudentAdmin
# Register your models here.
admin.site.register(Student,StudentAdmin)
Thus the program for creating a database using ORM hass been executed successfully