Commit b8dc1339 by Gregory Martin Committed by GitHub

Merge pull request #3 from edx/debug

rename
parents f530eb7d d01a20b7
=========== ===========
edx-video-pipeline veda-django
=========== ===========
Video encode automation django app/control node for edx-platform cookie-cutter django project for veda deployments
---------------------------------------------------------------- -------------------------------------------------
**The video pipeline performs the following tasks** [] / 2017.01
- Ingest (Discovery, Cataloging, Sending tasks to worker cluster) ~~~~~~~~~~~~~~~~
- Delivery
- Storage
- Maintenance
The video pipeline seeks modularity between parts, and for each part to operate as cleanly and independently as possible. .. image:: https://travis-ci.org/yro/veda-django.svg?branch=master
Each course's workflow operates independently, and workflows can be configured to serve a variety of endpoints. :target: https://travis-ci.org/yro/veda-django
INGEST:
Currently we ingest remote video from edx-platform via the Studio video upload tool. The videos are discovered by the video pipeline and ingested upon succcessful upload, renamed to an internal ID schema, and routed to the appropriate transcode task cluster.
TRANSCODE:
code for this is housed at https://github.com/edx/edx-video-worker
DELIVERY:
Uploads product videos to specific third-party destinations (YT, AWS, 3Play, cielo24), retrieves URLs/Statuses/products.
STORAGE:
A specified AWS S3 bucket=
MAINTENANCE:
Logging, Data dumping, Celery node status and queue information
.. image:: https://travis-ci.org/edx/edx-video-pipeline.svg?branch=master
:target: https://travis-ci.org/edx/edx-video-pipeline
"""
VEDA's Django Secrets
NEVER SHARE ANYTHING IN HERE, like, EVER
--assume unchanged in git--
"""
import os
DJANGO_SECRET_KEY = ""
DJANGO_DB_USER = ""
DJANGO_DB_PASS = ""
DJANGO_ADMIN = ('', '')
SANDBOX_TOKEN = None
if SANDBOX_TOKEN is not None and SANDBOX_TOKEN in os.path.dirname(__file__):
DEBUG = True
DBHOST = ''
veda_dbname = ""
else:
DEBUG = False
DBHOST = ''
veda_dbname = ""
...@@ -22,7 +22,7 @@ if DATABASES is None: ...@@ -22,7 +22,7 @@ if DATABASES is None:
DATABASES = { DATABASES = {
'default': { 'default': {
'ENGINE': 'django.db.backends.mysql', 'ENGINE': 'django.db.backends.mysql',
'NAME': pipeline_dbname, 'NAME': veda_dbname,
'USER': DJANGO_DB_USER, 'USER': DJANGO_DB_USER,
'PASSWORD': DJANGO_DB_PASS, 'PASSWORD': DJANGO_DB_PASS,
'HOST': DBHOST, 'HOST': DBHOST,
...@@ -102,10 +102,10 @@ X_FRAME_OPTIONS = 'DENY' ...@@ -102,10 +102,10 @@ X_FRAME_OPTIONS = 'DENY'
SECURE_SSL_REDIRECT = False SECURE_SSL_REDIRECT = False
SECURE_CONTENT_TYPE_NOSNIFF = True SECURE_CONTENT_TYPE_NOSNIFF = True
SECURE_BROWSER_XSS_FILTER = True SECURE_BROWSER_XSS_FILTER = True
ROOT_URLCONF = 'video_common.urls' ROOT_URLCONF = 'VEDA.urls'
# Python dotted path to the WSGI application used by Django's runserver. # Python dotted path to the WSGI application used by Django's runserver.
WSGI_APPLICATION = 'video_common.wsgi.application' WSGI_APPLICATION = 'VEDA.wsgi.application'
REST_FRAMEWORK = { REST_FRAMEWORK = {
......
...@@ -5,14 +5,13 @@ sys.path.append(os.path.abspath(__file__)) ...@@ -5,14 +5,13 @@ sys.path.append(os.path.abspath(__file__))
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
from django.conf import settings from django.conf import settings
from rest_framework import routers from rest_framework.routers import DefaultRouter
# from rest_framework.routers import DefaultRouter
from django.conf.urls import patterns, include, url from django.conf.urls import patterns, include, url
from django.contrib import admin from django.contrib import admin
from VEDA_OS01 import views from VEDA_OS01 import views
router = routers.DefaultRouter() router = DefaultRouter()
admin.autodiscover() admin.autodiscover()
router.register(r'courses', views.CourseViewSet) router.register(r'courses', views.CourseViewSet)
......
""" """
...
""" """
import os import os
from django.core.wsgi import get_wsgi_application from django.core.wsgi import get_wsgi_application
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
os.environ.setdefault("PYTHON_EGG_CACHE", BASE_DIR + "/egg_cache") os.environ.setdefault("PYTHON_EGG_CACHE", BASE_DIR + "/egg_cache")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "video_common.settings") os.environ.setdefault("DJANGO_SETTINGS_MODULE", "VEDA.settings")
application = get_wsgi_application() application = get_wsgi_application()
""" """
Pipeline API METHODS VEDA_API METHODS
1. cheap-o token authorizer 1. cheap-o token authorizer
This is a super hacky way to finish the Oauth2 Flow, but I need to move on This is a super hacky way to finish the Oauth2 Flow, but I need to move on
...@@ -15,7 +15,7 @@ from oauth2_provider import models ...@@ -15,7 +15,7 @@ from oauth2_provider import models
from rest_framework.authtoken.models import Token from rest_framework.authtoken.models import Token
from django.contrib.auth.models import User from django.contrib.auth.models import User
from pipeline_env import * from veda_env import *
primary_directory = os.path.dirname(__file__) primary_directory = os.path.dirname(__file__)
sys.path.append(primary_directory) sys.path.append(primary_directory)
......
...@@ -16,7 +16,7 @@ project_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) ...@@ -16,7 +16,7 @@ project_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
if project_path not in sys.path: if project_path not in sys.path:
sys.path.append(project_path) sys.path.append(project_path)
os.environ['DJANGO_SETTINGS_MODULE'] = 'video_common.settings' os.environ['DJANGO_SETTINGS_MODULE'] = 'VEDA.settings'
django.setup() django.setup()
......
...@@ -118,4 +118,4 @@ def user_login(request): ...@@ -118,4 +118,4 @@ def user_login(request):
if __name__ == "__main__": if __name__ == "__main__":
pass course_view()
...@@ -9,7 +9,7 @@ if project_path not in sys.path: ...@@ -9,7 +9,7 @@ if project_path not in sys.path:
sys.path.append(project_path) sys.path.append(project_path)
class DeliverCli: class DeliverCli():
""" """
Deliver Deliver
...@@ -43,12 +43,12 @@ class DeliverCli: ...@@ -43,12 +43,12 @@ class DeliverCli:
) )
self.args = parser.parse_args() self.args = parser.parse_args()
self._parse_args() self._PARSE_ARGS()
def _parse_args(self): def _PARSE_ARGS(self):
self.list = self.args.list self.list = self.args.list
def run(self): def _RUN(self):
""" """
Launch Celery Delivery Worker Launch Celery Delivery Worker
...@@ -75,9 +75,9 @@ class DeliverCli: ...@@ -75,9 +75,9 @@ class DeliverCli:
def main(): def main():
deliverinstance = DeliverCli() DC = DeliverCli()
deliverinstance.get_args() DC.get_args()
deliverinstance.run() DC._RUN()
if __name__ == '__main__': if __name__ == '__main__':
......
...@@ -21,7 +21,7 @@ Command Line Interface ...@@ -21,7 +21,7 @@ Command Line Interface
""" """
class HealCli: class HealCli():
def __init__(self, **kwargs): def __init__(self, **kwargs):
self.logging = kwargs.get('logging', True) self.logging = kwargs.get('logging', True)
......
...@@ -24,6 +24,7 @@ class IngestCli(): ...@@ -24,6 +24,7 @@ class IngestCli():
self.course_list = [] self.course_list = []
def get_args(self): def get_args(self):
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.usage = ''' parser.usage = '''
...@@ -44,13 +45,16 @@ class IngestCli(): ...@@ -44,13 +45,16 @@ class IngestCli():
) )
self.args = parser.parse_args() self.args = parser.parse_args()
self._parse_args()
def _parse_args(self): self._PARSE_ARGS()
def _PARSE_ARGS(self):
self.course_id = self.args.courseid self.course_id = self.args.courseid
self.list = self.args.list self.list = self.args.list
def run(self):
def _RUN(self):
""" """
Loop, constant video retreival from Remotes Loop, constant video retreival from Remotes
...@@ -71,7 +75,7 @@ class IngestCli(): ...@@ -71,7 +75,7 @@ class IngestCli():
def main(): def main():
IC = IngestCli() IC = IngestCli()
IC.get_args() IC.get_args()
IC.run() IC._RUN()
if __name__ == '__main__': if __name__ == '__main__':
......
...@@ -20,7 +20,7 @@ from youtube_callback.daemon import generate_course_list ...@@ -20,7 +20,7 @@ from youtube_callback.daemon import generate_course_list
from youtube_callback.sftp_id_retrieve import callfunction from youtube_callback.sftp_id_retrieve import callfunction
class DaemonCli: class DaemonCli():
def __init__(self): def __init__(self):
self.args = None self.args = None
......
...@@ -16,7 +16,7 @@ Youtube Callback ...@@ -16,7 +16,7 @@ Youtube Callback
Command Line Interface Command Line Interface
""" """
# TODO: Add email daemon alert
class YoutubeCallbackCli(): class YoutubeCallbackCli():
...@@ -50,13 +50,13 @@ class YoutubeCallbackCli(): ...@@ -50,13 +50,13 @@ class YoutubeCallbackCli():
self.args = parser.parse_args() self.args = parser.parse_args()
self._parse_args() self._PARSE_ARGS()
def _parse_args(self): def _PARSE_ARGS(self):
self.course_id = self.args.courseid self.course_id = self.args.courseid
self.list = self.args.list self.list = self.args.list
def run(self): def _RUN(self):
if self.list is True: if self.list is True:
self.listcourses() self.listcourses()
...@@ -93,10 +93,11 @@ class YoutubeCallbackCli(): ...@@ -93,10 +93,11 @@ class YoutubeCallbackCli():
print course.edx_classid print course.edx_classid
def main(): def main():
YTCC = YoutubeCallbackCli() YTCC = YoutubeCallbackCli()
YTCC.get_args() YTCC.get_args()
YTCC.run() YTCC._RUN()
if __name__ == '__main__': if __name__ == '__main__':
sys.exit(main()) sys.exit(main())
...@@ -10,9 +10,9 @@ Start Celery Worker ...@@ -10,9 +10,9 @@ Start Celery Worker
""" """
try: try:
from control.control_env import * from control.veda_env import *
except: except:
from control_env import * from veda_env import *
try: try:
from control.veda_deliver import VedaDelivery from control.veda_deliver import VedaDelivery
...@@ -20,8 +20,8 @@ except: ...@@ -20,8 +20,8 @@ except:
from veda_deliver import VedaDelivery from veda_deliver import VedaDelivery
auth_yaml = os.path.join( auth_yaml = os.path.join(
os.path.dirname(os.path.dirname(os.path.abspath(__file__))), os.path.dirname(os.path.abspath(__file__)),
'instance_config.yaml' 'veda_auth.yaml'
) )
with open(auth_yaml, 'r') as stream: with open(auth_yaml, 'r') as stream:
try: try:
......
...@@ -34,7 +34,7 @@ and upload to the appropriate endpoint via the approp. methods ...@@ -34,7 +34,7 @@ and upload to the appropriate endpoint via the approp. methods
""" """
homedir = expanduser("~") homedir = expanduser("~")
from control_env import * from veda_env import *
from veda_utils import ErrorObject, Output, Metadata, VideoProto from veda_utils import ErrorObject, Output, Metadata, VideoProto
from veda_video_validation import Validation from veda_video_validation import Validation
from veda_val import VALAPICall from veda_val import VALAPICall
......
...@@ -22,7 +22,7 @@ priority = ...@@ -22,7 +22,7 @@ priority =
turnaround_hours = number, overrides 'priority' call, will change a standard to a priority silently turnaround_hours = number, overrides 'priority' call, will change a standard to a priority silently
""" """
from control_env import * from veda_env import *
from veda_utils import ErrorObject, Output from veda_utils import ErrorObject, Output
requests.packages.urllib3.disable_warnings() requests.packages.urllib3.disable_warnings()
......
...@@ -11,7 +11,7 @@ Youtube Dynamic Upload ...@@ -11,7 +11,7 @@ Youtube Dynamic Upload
Note: This represents early VEDA work, but is functional Note: This represents early VEDA work, but is functional
""" """
from control_env import * from veda_env import *
def printTotals(transferred, toBeTransferred): def printTotals(transferred, toBeTransferred):
......
...@@ -13,7 +13,7 @@ Get a list of needed encodes from VEDA ...@@ -13,7 +13,7 @@ Get a list of needed encodes from VEDA
* Protected against extant URLs * * Protected against extant URLs *
""" """
from control_env import * from veda_env import *
from dependencies.shotgun_api3 import Shotgun from dependencies.shotgun_api3 import Shotgun
newrelic.agent.initialize( newrelic.agent.initialize(
......
#!/usr/bin/env python #!/usr/bin/env python
"""
VEDA Environment variables
"""
import os import os
import sys import sys
...@@ -10,11 +6,19 @@ import django ...@@ -10,11 +6,19 @@ import django
from django.utils.timezone import utc from django.utils.timezone import utc
from django.db import reset_queries from django.db import reset_queries
"""
VEDA Environment variables
"""
"""
Import Django Shit
"""
project_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) project_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
if project_path not in sys.path: if project_path not in sys.path:
sys.path.append(project_path) sys.path.append(project_path)
os.environ['DJANGO_SETTINGS_MODULE'] = 'video_common.settings' os.environ['DJANGO_SETTINGS_MODULE'] = 'VEDA.settings'
django.setup() django.setup()
......
...@@ -27,7 +27,7 @@ Currently: ...@@ -27,7 +27,7 @@ Currently:
Local (watchfolder w/o edit priv.) Local (watchfolder w/o edit priv.)
""" """
from control_env import * from veda_env import *
from veda_utils import ErrorObject from veda_utils import ErrorObject
from veda_file_ingest import VideoProto, VedaIngest from veda_file_ingest import VideoProto, VedaIngest
from veda_val import VALAPICall from veda_val import VALAPICall
......
...@@ -31,7 +31,7 @@ This just takes discovered ...@@ -31,7 +31,7 @@ This just takes discovered
- Studio Uploads - Studio Uploads
- FTP Uploads - FTP Uploads
""" """
from control_env import * from veda_env import *
from veda_hotstore import Hotstore from veda_hotstore import Hotstore
from veda_video_validation import Validation from veda_video_validation import Validation
from veda_utils import ErrorObject, Output, Report from veda_utils import ErrorObject, Output, Report
......
...@@ -31,7 +31,7 @@ Roll through videos, check for completion ...@@ -31,7 +31,7 @@ Roll through videos, check for completion
""" """
from control_env import * from veda_env import *
from veda_encode import VedaEncode from veda_encode import VedaEncode
from veda_val import VALAPICall from veda_val import VALAPICall
......
...@@ -19,7 +19,7 @@ newrelic.agent.initialize( ...@@ -19,7 +19,7 @@ newrelic.agent.initialize(
Let's do some quick and dirty error handling & logging Let's do some quick and dirty error handling & logging
""" """
from control.control_env import * from control.veda_env import *
from control.veda_encode import VedaEncode from control.veda_encode import VedaEncode
......
...@@ -36,7 +36,7 @@ Send data to VAL, either Video ID data or endpoint URLs ...@@ -36,7 +36,7 @@ Send data to VAL, either Video ID data or endpoint URLs
"imported": _IMPORTED, "imported": _IMPORTED,
''' '''
from control_env import * from veda_env import *
from control.veda_utils import ErrorObject, Output from control.veda_utils import ErrorObject, Output
......
...@@ -23,7 +23,7 @@ image files (which read as 0:00 duration or N/A) ...@@ -23,7 +23,7 @@ image files (which read as 0:00 duration or N/A)
Mismatched Durations (within 5 sec) Mismatched Durations (within 5 sec)
""" """
from control_env import * from veda_env import *
class Validation(): class Validation():
......
...@@ -9,7 +9,7 @@ import yaml ...@@ -9,7 +9,7 @@ import yaml
ABVID REPORTING - email / etc. ABVID REPORTING - email / etc.
''' '''
from frontend_env import * from veda_env import *
''' '''
v1 = Video.objects.filter(edx_id = upload_info['edx_id']) v1 = Video.objects.filter(edx_id = upload_info['edx_id'])
......
...@@ -7,7 +7,7 @@ import sys ...@@ -7,7 +7,7 @@ import sys
import datetime import datetime
from frontend_env import * from veda_env import *
def create_record(upload_data): def create_record(upload_data):
......
...@@ -9,7 +9,7 @@ import datetime ...@@ -9,7 +9,7 @@ import datetime
from django.utils.timezone import utc from django.utils.timezone import utc
from frontend_env import * from veda_env import *
""" """
Import Django Shit Import Django Shit
......
#!/usr/bin/env python #!/usr/bin/env python
"""
VEDA Environment variables
"""
import os import os
import sys import sys
...@@ -10,6 +6,14 @@ import django ...@@ -10,6 +6,14 @@ import django
from django.utils.timezone import utc from django.utils.timezone import utc
"""
VEDA Environment variables
"""
"""
Import Django Shit
"""
project_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) project_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
if project_path not in sys.path: if project_path not in sys.path:
sys.path.append(project_path) sys.path.append(project_path)
...@@ -24,6 +28,12 @@ from VEDA_OS01.models import Video ...@@ -24,6 +28,12 @@ from VEDA_OS01.models import Video
from VEDA_OS01.models import URL from VEDA_OS01.models import URL
from VEDA_OS01.models import VedaUpload from VEDA_OS01.models import VedaUpload
"""
Generalized display and such
"""
""" """
TERM COLORS TERM COLORS
""" """
......
...@@ -13,7 +13,7 @@ from django.http import HttpResponse ...@@ -13,7 +13,7 @@ from django.http import HttpResponse
from django.template import RequestContext, loader from django.template import RequestContext, loader
from django.http import HttpResponseRedirect from django.http import HttpResponseRedirect
from frontend_env import * from veda_env import *
from course_validate import VEDACat from course_validate import VEDACat
from abvid_validate import validate_incoming, create_record, send_to_pipeline from abvid_validate import validate_incoming, create_record, send_to_pipeline
......
...@@ -3,7 +3,7 @@ import os ...@@ -3,7 +3,7 @@ import os
import sys import sys
if __name__ == "__main__": if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "video_common.settings") os.environ.setdefault("DJANGO_SETTINGS_MODULE", "VEDA.settings")
from django.core.management import execute_from_command_line from django.core.management import execute_from_command_line
......
## NOTE: This is not a working req file -- merely a collection for notes. ## NOTE: This is not a working req file -- merely a collection for notes.
### TODO: Make this a working file
django<1.10 django<1.10
djangorestframework djangorestframework
oauth2_provider oauth2_provider
...@@ -10,3 +12,11 @@ uwsgi ...@@ -10,3 +12,11 @@ uwsgi
pysftp pysftp
boto boto
pyyaml pyyaml
# below is a yum install
# python-devel mysql-devel
# gcc
# mysql-python
# git
# pcre-devel
# nginx
...@@ -14,7 +14,7 @@ sys.path.append( ...@@ -14,7 +14,7 @@ sys.path.append(
os.path.dirname(os.path.dirname(os.path.abspath(__file__))) os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
) )
# import abvid_reporting # import abvid_reporting
from pipeline_env import * from veda_env import *
from veda_heal import VedaHeal from veda_heal import VedaHeal
sick_list = [ sick_list = [
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"> <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> <meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>edX Video Pipeline New Course Input</title> <title>edX/VEDA New Course Input</title>
<script src='//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js'></script> <script src='//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js'></script>
<link rel="icon" type="image/ico" href="https://s3.amazonaws.com/mediateam.edx.org/favicon.ico"/> <link rel="icon" type="image/ico" href="https://s3.amazonaws.com/mediateam.edx.org/favicon.ico"/>
...@@ -46,7 +46,7 @@ var institution_list = {{ institution_list|safe }} ...@@ -46,7 +46,7 @@ var institution_list = {{ institution_list|safe }}
<div id="data"></div> <div id="data"></div>
</div> </div>
<div id="initial_title"> <div id="initial_title">
<span>edX Video Pipeline Course Addition Tool</span> <span>VEDA Course Addition Tool</span>
</div> </div>
<div id="forminput" class="course_input"> <div id="forminput" class="course_input">
...@@ -83,7 +83,7 @@ var institution_list = {{ institution_list|safe }} ...@@ -83,7 +83,7 @@ var institution_list = {{ institution_list|safe }}
</div> </div>
<div class="footer"> <div class="footer">
edx-video-pipeline i/o version 1.0.0 veda_os i/o version 0.90 (B)
</p> </p>
<a href="../admin/logout/">logout</a> <a href="../admin/logout/">logout</a>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"> <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> <meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>edX video pipeline</title> <title>edX/VEDA</title>
<link rel="shortcut icon" type="image/png" href="/static/img/MPT-Logo.png"/> <link rel="shortcut icon" type="image/png" href="/static/img/MPT-Logo.png"/>
{% load staticfiles %} {% load staticfiles %}
......
...@@ -204,7 +204,7 @@ function create_post(inst) { ...@@ -204,7 +204,7 @@ function create_post(inst) {
$("#institutional").empty(); $("#institutional").empty();
var $inst_name = $("<div>", {id: "institution_title", class: "data"}); var $inst_name = $("<div>", {id: "institution_title", class: "data"});
$inst_name.append('<span class="tiny_titles">edX Video Pipeline Course Addition Tool : </span><br>') $inst_name.append('<span class="tiny_titles">VEDA Course Addition Tool : </span><br>')
if (json.length == 0) { if (json.length == 0) {
$inst_name.append(('NEW INSTITUTION')); $inst_name.append(('NEW INSTITUTION'));
} }
...@@ -614,7 +614,7 @@ function submit_data () { ...@@ -614,7 +614,7 @@ function submit_data () {
$('#return').append('<h3>Success!</h3>'); $('#return').append('<h3>Success!</h3>');
$('#return').append('<span class=\"advisory\" style=\"margin-left: 49px;\">Paste into edX Studio Advanced Settings > <br>Video Upload Credentials</span>') $('#return').append('<span class=\"advisory\" style=\"margin-left: 49px;\">Paste into edX Studio Advanced Settings > <br>Video Upload Credentials</span>')
$('#return').append('<span class=\"final_data\"> &nbsp;\"course_video_upload_token\": \"'+json['studio_hex']+'\"&nbsp;<span><br>') $('#return').append('<span class=\"final_data\"> &nbsp;\"course_video_upload_token\": \"'+json['studio_hex']+'\"&nbsp;<span><br>')
$('#return').append('<span class=\"advisory\" style=\"margin-left: 49px;\">Pipeline Code : ' + json['course_code'] + '</span><br>') $('#return').append('<span class=\"advisory\" style=\"margin-left: 49px;\">VEDA Code : ' + json['course_code'] + '</span><br>')
// Reset Button // Reset Button
$('#rstb').attr('value', 'New') $('#rstb').attr('value', 'New')
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"> <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> <meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>edX Video Pipeline Video Upload</title> <title>edX/VEDA Video Upload</title>
<link rel="shortcut icon" type="image/png" href="/static/img/MPT-Logo.png"/> <link rel="shortcut icon" type="image/png" href="/static/img/MPT-Logo.png"/>
{% load staticfiles %} {% load staticfiles %}
...@@ -71,7 +71,7 @@ $('#inst_lookup').hide() ...@@ -71,7 +71,7 @@ $('#inst_lookup').hide()
</script> </script>
<div class="footer"> <div class="footer">
<span class="help"><a target="_blank" href="http://edx.readthedocs.org/projects/edx-partner-course-staff/en/latest/set_up_course/setting_up_student_view.html#add-a-course-about-video-to-edx-org">Help?</a></span><br> <span class="help"><a target="_blank" href="http://edx.readthedocs.org/projects/edx-partner-course-staff/en/latest/set_up_course/setting_up_student_view.html#add-a-course-about-video-to-edx-org">Help?</a></span><br>
edx-video-pipeline i/o <br> veda_os i/o <br>
version 1.1 version 1.1
</div> </div>
</body> </body>
......
"""
Video Pipeline Django Secrets Shim
This acts as a django-secret shimmer until we can finish pushing all changes to terraform/prod
"""
import os
import yaml
read_yaml = os.path.join(
os.path.dirname(os.path.dirname(os.path.abspath(__file__))),
'instance_config.yaml'
)
with open(read_yaml, 'r') as stream:
try:
return_dict = yaml.load(stream)
except yaml.YAMLError as exc:
return_dict = None
DJANGO_SECRET_KEY = return_dict['django_secret_key']
DJANGO_ADMIN = ('', '')
DEBUG = True
DATABASES = return_dict['DATABASES']
...@@ -20,7 +20,7 @@ project_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) ...@@ -20,7 +20,7 @@ project_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
if project_path not in sys.path: if project_path not in sys.path:
sys.path.append(project_path) sys.path.append(project_path)
os.environ['DJANGO_SETTINGS_MODULE'] = 'video_common.settings' os.environ['DJANGO_SETTINGS_MODULE'] = 'VEDA.settings'
django.setup() django.setup()
......
...@@ -21,7 +21,7 @@ from django.utils.timezone import utc ...@@ -21,7 +21,7 @@ from django.utils.timezone import utc
project_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) project_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
if project_path not in sys.path: if project_path not in sys.path:
sys.path.append(project_path) sys.path.append(project_path)
os.environ['DJANGO_SETTINGS_MODULE'] = 'video_common.settings' os.environ['DJANGO_SETTINGS_MODULE'] = 'VEDA.settings'
django.setup() django.setup()
from VEDA_OS01.models import Video, Encode, URL from VEDA_OS01.models import Video, Encode, URL
......
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