JourneyJoker/frontend/models.py

17 lines
533 B
Python
Raw Normal View History

2021-03-01 09:56:10 +00:00
from django.db import models
2021-03-22 17:42:07 +00:00
from django.conf import settings
from django.core.validators import MaxValueValidator, MinValueValidator
2021-03-01 09:56:10 +00:00
# Create your models here.
2021-03-22 17:42:07 +00:00
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)