28 lines
796 B
Python
28 lines
796 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]
|