models.py 649 Bytes
Newer Older
1 2 3
"""
Models for contentstore
"""
4
# pylint: disable=no-member
5 6 7 8 9 10

from django.db.models.fields import TextField

from config_models.models import ConfigurationModel


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

    @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]