16 lines
533 B
Python
16 lines
533 B
Python
from django.db import models
|
|
from django.conf import settings
|
|
from django.core.validators import MaxValueValidator, MinValueValidator
|
|
|
|
# Create your models here.
|
|
|
|
class Testimonial(models.Model):
|
|
name = models.CharField(max_length=128)
|
|
text = models.TextField()
|
|
stars = models.PositiveIntegerField(
|
|
validators=[
|
|
MaxValueValidator(5),
|
|
MinValueValidator(1)
|
|
])
|
|
language = models.CharField(max_length=12, choices=settings.LANGUAGES)
|
|
public = models.BooleanField(default=False)
|