Commit baba913a by Gregory Martin Committed by GitHub

Merge pull request #28 from edx/update_admin_behavior

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