Files
edx-platform/lms/djangoapps/mobile_api/models.py
christopher lee 3b150da1d7 MA-169 return requested val encoded video profiles
MA-169 Mobile api now calls for mobile_low (default), mobile_high,
 and youtube profiles instead of only mobile_low.
2015-03-25 15:40:58 -04:00

28 lines
825 B
Python

"""
ConfigurationModel for the mobile_api djangoapp.
"""
from django.db.models.fields import TextField
from config_models.models import ConfigurationModel
class MobileApiConfig(ConfigurationModel):
"""
Configuration for the video upload feature.
The order in which the comma-separated list of names of profiles are given
is in priority order.
"""
video_profiles = TextField(
blank=True,
help_text="A comma-separated list of names of profiles to include for videos returned from the mobile API."
)
@classmethod
def get_video_profiles(cls):
"""
Get the list of profiles in priority order when requesting from VAL
"""
return [profile.strip() for profile in cls.current().video_profiles.split(",") if profile] # pylint: disable=no-member