Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-video-pipeline
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-video-pipeline
Commits
c3e16328
Commit
c3e16328
authored
Aug 01, 2017
by
Mushtaq Ali
Committed by
muzaffaryousaf
Oct 16, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add transcription provider model and add it to admin side
parent
31e96027
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
1 deletions
+36
-1
VEDA_OS01/admin.py
+10
-1
VEDA_OS01/models.py
+26
-0
No files found.
VEDA_OS01/admin.py
View file @
c3e16328
from
django.contrib
import
admin
from
VEDA_OS01.models
import
Course
,
Video
,
Encode
,
URL
,
Destination
,
Institution
,
VedaUpload
from
VEDA_OS01.models
import
(
Course
,
Video
,
Encode
,
URL
,
Destination
,
Institution
,
VedaUpload
,
TranscriptionProvider
)
class
CourseAdmin
(
admin
.
ModelAdmin
):
...
...
@@ -101,6 +105,10 @@ class VideoUploadAdmin(admin.ModelAdmin):
]
class
TranscriptionProviderAdmin
(
admin
.
ModelAdmin
):
model
=
TranscriptionProvider
admin
.
site
.
register
(
Course
,
CourseAdmin
)
admin
.
site
.
register
(
Video
,
VideoAdmin
)
admin
.
site
.
register
(
Encode
,
EncodeAdmin
)
...
...
@@ -108,3 +116,4 @@ admin.site.register(URL, URLAdmin)
admin
.
site
.
register
(
Destination
,
DestinationAdmin
)
admin
.
site
.
register
(
Institution
,
InstitutionAdmin
)
admin
.
site
.
register
(
VedaUpload
,
VideoUploadAdmin
)
admin
.
site
.
register
(
TranscriptionProvider
,
TranscriptionProviderAdmin
)
VEDA_OS01/models.py
View file @
c3e16328
...
...
@@ -428,3 +428,29 @@ class VedaUpload (models.Model):
self
.
status_email
,
self
.
file_complete
)
class
TranscriptionProviderType
(
object
):
"""
3rd party transcript providers.
"""
THREE_PLAY
=
'3PlayMedia'
CIELO24
=
'Cielo24'
CHOICES
=
(
(
THREE_PLAY
,
THREE_PLAY
),
(
CIELO24
,
CIELO24
),
)
class
TranscriptionProvider
(
models
.
Model
):
"""
Model to contain third party transcription service provider preferances.
"""
org
=
models
.
CharField
(
'Organization'
,
max_length
=
50
,
unique
=
True
)
provider
=
models
.
CharField
(
'Transcription provider'
,
max_length
=
50
,
choices
=
TranscriptionProviderType
.
CHOICES
)
api_key
=
models
.
CharField
(
'API key'
,
max_length
=
255
)
api_secret
=
models
.
CharField
(
'API secret'
,
max_length
=
255
,
null
=
True
,
blank
=
True
)
languages
=
models
.
CharField
(
'Preferred languages'
,
max_length
=
255
)
def
__unicode__
(
self
):
return
self
.
org
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment