19 lines
475 B
Python
19 lines
475 B
Python
from django.db import models
|
|
|
|
from .aes_field import AESEncryptedField
|
|
|
|
|
|
class SiteSettings(models.Model):
|
|
PRETTY_NAME = "Réglages du site"
|
|
allow_upload = models.BooleanField(
|
|
verbose_name="Autoriser l'upload de vidéos.",
|
|
default=False,
|
|
)
|
|
home_message = models.TextField(
|
|
verbose_name="Message de la page d'accueil",
|
|
default=""
|
|
)
|
|
|
|
@classmethod
|
|
def get_settings(cls):
|
|
return cls.objects.get_or_create()[0]
|