mirror of
https://github.com/DerTyp7/tealcode-django-python.git
synced 2025-10-30 20:57:07 +01:00
added contact form
This commit is contained in:
15
TealCode/contact/models.py
Normal file
15
TealCode/contact/models.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from django.db import models
|
||||
from django.utils import timezone
|
||||
|
||||
class Entry(models.Model):
|
||||
ip = models.CharField(max_length=80)
|
||||
email = models.EmailField(max_length=200)
|
||||
subject = models.CharField(max_length=80)
|
||||
message = models.TextField(max_length=4000)
|
||||
date_created = models.DateTimeField(default=timezone.now)
|
||||
|
||||
|
||||
def __str__(self):
|
||||
return self.email + " - " + self.subject
|
||||
|
||||
|
||||
Reference in New Issue
Block a user