Consider the model below
class Faculty(models.Model): name = models.CharField(max_length=255) short_name = models.CharField(max_length=15) description = models.CharField(max_length=512) logo = models.ImageField(upload_to=faculty_upload_to, null=True)
That I doFaculty.objects.create()
or
faculty = Faculty()faculty.save()
this creates an empty entry in the database
>>> from universities.models import *>>> Faculty.objects.create()<Faculty: Faculty object (2)>
Why doesn't Django give me an integrity error? I am using Django 5.0.