first commit

This commit is contained in:
Beyhan Oğur
2026-04-26 22:20:45 +03:00
commit d50f14bcb1
681 changed files with 65020 additions and 0 deletions

22
contact/models.py Normal file
View File

@@ -0,0 +1,22 @@
from django.db import models
# Create your models here.
class Contact(models.Model):
user = models.ForeignKey('accounts.CustomUser', on_delete=models.SET_NULL, null=True, blank=True, verbose_name="Kullanıcı")
name = models.CharField(max_length=254, verbose_name="Ad Soyad ")
email = models.CharField(max_length=254, verbose_name="Eposta Adresi ")
ip = models.CharField(max_length=100, verbose_name="IP Adresi ", blank=True, null=True)
subject = models.CharField(max_length=254, verbose_name="Konu ")
message = models.TextField(verbose_name="Mesaj ")
created_at = models.DateTimeField(auto_now_add=True, editable=False, verbose_name="Oluşturulma Tarihi")
updated_at = models.DateTimeField(auto_now=True, editable=False, verbose_name="Güncelleme Tarihi")
class Meta:
ordering = ["created_at"]
db_table = 'contacts'
verbose_name_plural = "Contact"
verbose_name = "Contact"
def __str__(self):
return f"Contact: {self.name}"