Commit d5ec9e5e by muhammad-ammar

add video_source_language field

parent ba8dcb03
# -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-08-24 07:21
# Generated by Django 1.11.4 on 2017-09-22 07:13
from __future__ import unicode_literals
from django.db import migrations, models
......@@ -27,6 +27,7 @@ class Migration(migrations.Migration):
('cielo24_turnaround', models.CharField(blank=True, choices=[(b'STANDARD', b'Standard, 48h'), (b'PRIORITY', b'Priority, 24h')], max_length=20, null=True, verbose_name=b'Cielo24 Turnaround')),
('three_play_turnaround', models.CharField(blank=True, choices=[(b'extended_service', b'10-Day/Extended'), (b'default', b'4-Day/Default'), (b'expedited_service', b'2-Day/Expedited'), (b'rush_service', b'24 hour/Rush'), (b'same_day_service', b'Same Day')], max_length=20, null=True, verbose_name=b'3PlayMedia Turnaround')),
('preferred_languages', edxval.models.ListField(blank=True, default=[], max_items=50, verbose_name=b'Preferred Languages')),
('video_source_language', models.CharField(blank=True, help_text=b'This is the source language of a video.', max_length=20, null=True, verbose_name=b'Video Source Language')),
],
options={
'abstract': False,
......
......@@ -600,6 +600,13 @@ class TranscriptPreference(TimeStampedModel):
blank=True,
)
preferred_languages = ListField(verbose_name='Preferred Languages', max_items=50, default=[], blank=True)
video_source_language = models.CharField(
verbose_name='Video Source Language',
max_length=20,
null=True,
blank=True,
help_text='This is the source language of a video.'
)
def __unicode__(self):
return u'{course_id} - {provider}'.format(course_id=self.course_id, provider=self.provider)
......
......@@ -217,7 +217,8 @@ class TranscriptPreferenceSerializer(serializers.ModelSerializer):
'cielo24_turnaround',
'three_play_turnaround',
'preferred_languages',
'modified'
'video_source_language',
'modified',
)
preferred_languages = serializers.SerializerMethodField()
......
......@@ -426,12 +426,14 @@ TRANSCRIPT_PREFERENCES_CIELO24 = dict(
provider=TranscriptProviderType.CIELO24,
cielo24_fidelity=Cielo24Fidelity.PROFESSIONAL,
cielo24_turnaround=Cielo24Turnaround.PRIORITY,
preferred_languages=['ar']
preferred_languages=['ar'],
video_source_language='en',
)
TRANSCRIPT_PREFERENCES_3PLAY = dict(
course_id='edX/DemoX/Demo_Course',
provider=TranscriptProviderType.THREE_PLAY_MEDIA,
three_play_turnaround=ThreePlayTurnaround.SAME_DAY_SERVICE,
preferred_languages=['ar', 'en']
preferred_languages=['ar', 'en'],
video_source_language='en',
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment