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
6224cf8c
Commit
6224cf8c
authored
Aug 01, 2017
by
Mushtaq Ali
Committed by
muhammad-ammar
Aug 15, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add transcription provider model and add it to admin side
parent
84b32a6e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
1 deletions
+33
-1
VEDA_OS01/admin.py
+10
-1
VEDA_OS01/models.py
+23
-0
No files found.
VEDA_OS01/admin.py
View file @
6224cf8c
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
):
...
...
@@ -99,6 +103,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
)
...
...
@@ -106,3 +114,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 @
6224cf8c
...
...
@@ -428,3 +428,26 @@ 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
)
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