models.py 728 Bytes
Newer Older
1 2 3 4 5 6 7 8 9
"""
Models for contentstore
"""

from django.db.models.fields import TextField

from config_models.models import ConfigurationModel


10 11
class VideoUploadConfig(ConfigurationModel):
    """Configuration for the video upload feature."""
12 13
    profile_whitelist = TextField(
        blank=True,
14
        help_text="A comma-separated list of names of profiles to include in video encoding downloads."
15 16 17 18 19 20
    )

    @classmethod
    def get_profile_whitelist(cls):
        """Get the list of profiles to include in the encoding download"""
        return [profile for profile in cls.current().profile_whitelist.split(",") if profile]
21 22 23 24


class PushNotificationConfig(ConfigurationModel):
    """Configuration for mobile push notifications."""