JourneyJoker/frontend/models.py
2020-01-26 11:53:25 +01:00

16 lines
No EOL
566 B
Python

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