From: yomguy Date: Sun, 22 Jul 2012 22:37:25 +0000 (+0200) Subject: set mime types at imports X-Git-Tag: 0.7.1^2~15 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=f35d35b53fed7c0ad69d36ba4c173ad2ab8856e1;p=teleforma.git set mime types at imports --- diff --git a/teleforma/management/commands/teleforma-import-conferences.py b/teleforma/management/commands/teleforma-import-conferences.py index 5ab374d0..5cb6c6a2 100644 --- a/teleforma/management/commands/teleforma-import-conferences.py +++ b/teleforma/management/commands/teleforma-import-conferences.py @@ -73,7 +73,6 @@ class Command(BaseCommand): department, c = Department.objects.get_or_create(name=department_name, organization=organization) if Conference.objects.filter(public_id=public_id): - print path conference = Conference.objects.get(public_id=public_id) conference.course = Course.objects.get(code=course_id) conference.course_type = CourseType.objects.get(name=course_type) @@ -133,6 +132,7 @@ class Command(BaseCommand): media.course = conference.course media.course_type = conference.course_type media.type = ext + media.set_mime_type() media.save() logger.logger.info(path) i += 1