-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodels.py
More file actions
21 lines (18 loc) · 786 Bytes
/
models.py
File metadata and controls
21 lines (18 loc) · 786 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from django.db import models
from django.utils import timezone
# Create your models here.
class ContactForm(models.Model):
full_name = models.CharField(max_length=300,blank=True)
#This field store Email ID
email_id = models.CharField(max_length=300,blank=True)
#This field store Contact Number
contact_number = models.CharField(max_length=300,blank=True)
#This field store Message
message = models.TextField(max_length=3000,blank=True)
#This field store Date & Time at which form is submitted
created_at = models.DateTimeField(default=timezone.now)
def __str__(self):
return str(self.pk) #Return Primary Key
class Meta:
verbose_name_plural = "Contact Form Data"
verbose_name = "Contact Form"