Commit fb4986f4 by Gregory Martin

Update

parent 13fb273e
...@@ -59,18 +59,20 @@ class EncodeAdmin(admin.ModelAdmin): ...@@ -59,18 +59,20 @@ class EncodeAdmin(admin.ModelAdmin):
class URLAdmin(admin.ModelAdmin): class URLAdmin(admin.ModelAdmin):
model = URL model = URL
list_display = [ list_display = [
'videoID', 'video_id_get',
'encode_get',
'encode_url',
'url_date', 'url_date',
'val_input', 'encode_url',
'xuetang_input' 'encode_get',
'val_input'
] ]
list_filter = ['videoID__inst_class__institution'] list_filter = ['videoID__inst_class__institution']
def encode_get(self, obj): def encode_get(self, obj):
return obj.encode_profile.encode_name return obj.encode_profile.encode_name
def video_id_get(self, obj):
return obj.videoID.edx_id
search_fields = [ search_fields = [
'videoID__edx_id', 'videoID__edx_id',
'videoID__client_title', 'videoID__client_title',
......
...@@ -370,7 +370,7 @@ class URL (models.Model): ...@@ -370,7 +370,7 @@ class URL (models.Model):
get_latest_by = 'url_date' get_latest_by = 'url_date'
def __unicode__(self): def __unicode__(self):
return u'%s : %s : %s'.format(self.videoID, self.encode_profile.encode_name, self.url_date) or u'' return u'%s : %s : %s'.format(self.videoID.edx_id, self.encode_profile.encode_name, self.url_date) or u''
class VedaUpload (models.Model): class VedaUpload (models.Model):
......
...@@ -27,7 +27,7 @@ django.setup() ...@@ -27,7 +27,7 @@ django.setup()
Defaults Defaults
""" """
data_window = datetime.datetime.utcnow().replace(tzinfo=utc) - \ data_window = datetime.datetime.utcnow().replace(tzinfo=utc) - \
timedelta(days=15) timedelta(days=3)
def get_course(course_id): def get_course(course_id):
......
...@@ -31,7 +31,7 @@ Defaults: ...@@ -31,7 +31,7 @@ Defaults:
""" """
homedir = expanduser("~") homedir = expanduser("~")
workdir = os.path.join(homedir, 'download_data_holding') workdir = os.path.join(homedir, 'download_data_holding')
YOUTUBE_LOOKBACK_DAYS = 15 YOUTUBE_LOOKBACK_DAYS = 4
def callfunction(course): def callfunction(course):
......
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