codescraftman / about / models.py
models.py
Raw
# about/models.py

from django.db import models

class About(models.Model):
    general_description = models.TextField()
    vision = models.TextField()
    mission = models.TextField()

    def __str__(self):
        return "About Section: General Description, Vision, Mission"

class Goal(models.Model):
    title = models.CharField(max_length=255)
    description = models.TextField()

    def __str__(self):
        return f"Goal: {self.title}"

class Value(models.Model):
    title = models.CharField(max_length=255)
    description = models.TextField()

    def __str__(self):
        return f"Value: {self.title}"

class Testimonial(models.Model):
    author = models.CharField(max_length=255)
    content = models.TextField()
    position = models.CharField(max_length=255, blank=True, null=True)
    company = models.CharField(max_length=255, blank=True, null=True)
    created_at = models.DateTimeField(auto_now_add=True)

    def __str__(self):
        return f"Testimonial by {self.author}"