1from django.db import models
2# Create your models here.
3
4class Contact(models.Model):
5 name = models.CharField(max_length=50)
6 email = models.CharField(max_length=50)
7 contact = models.CharField(max_length=50)
8 content = models.TextField()
9 def __str__(self):
10 return self.name + ' ' + self.email
1The ID in django is a "unique identifier" for each models instances.
2You do not need to explicitly add a ID field to your own models as
3the ID attribute is automatically generated for you behind the scences
4by django for each new model and any newly created instances of that
5model afterwards.