To develop a Django application to store and retrieve data from a database using Object Relational Mapping(ORM).
Clone the repository to theia ide. start a new app inside the project folder.
Type the appropriate code for your table and provide appropriate data types to the columns.
Create a report about your project in readme.md file and upload the django.orm.app folder to your remote repository.
from django.db import models
from django.contrib import admin
# Create your models here.
class Hostel(models.Model):
Roomno =models.IntegerField(primary_key=True, help_text="Roomno")
Name =models.CharField(max_length=100)
age =models.IntegerField()
native =models.CharField(max_length=100)
noofinmates=models.IntegerField()
class Hostelinfo(admin.ModelAdmin):
list_display = ('Roomno','Name','age','native','noofinmates')
Thus the project is developed to have Hostel information database