2015-05-02 15:00:15 +00:00
|
|
|
from django.db import models
|
|
|
|
|
|
|
|
# Create your models here.
|
|
|
|
|
|
|
|
class Message(models.Model):
|
|
|
|
name = models.CharField(max_length=200)
|
|
|
|
email = models.EmailField()
|
|
|
|
phone_number = models.CharField(max_length=200)
|
|
|
|
message = models.TextField()
|
|
|
|
|
|
|
|
received_date = models.DateTimeField('date received')
|
2015-05-02 15:12:46 +00:00
|
|
|
|
|
|
|
def __str__(self):
|
|
|
|
return "%s - %s - %s" % (self.name, self.email, self.received_date)
|