]> git.parisson.com Git - teleforma.git/commitdiff
add date to media unicode
authorGuillaume Pellerin <yomguy@parisson.com>
Thu, 26 Dec 2013 15:18:45 +0000 (16:18 +0100)
committerGuillaume Pellerin <yomguy@parisson.com>
Thu, 26 Dec 2013 15:18:45 +0000 (16:18 +0100)
teleforma/management/commands/teleforma-import-seminar-media.py
teleforma/models/core.py

index dfa53dcc7ddf1d4ffc8836e34faadfc3278956fc..ed358524ddd1ba1eb7889324754db3799eeae227 100644 (file)
@@ -24,7 +24,7 @@ class Logger:
 
 
 class Command(BaseCommand):
-    help = "Import seminars from the MEDIA_ROOT directory for a special period.name"
+    help = "Import seminars from a media directory for a special period.name"
     admin_email = 'webmaster@parisson.com'
     args = 'organization period_name log_file media_dir'
     spacer = '_-_'
index caa8249eac94eed950cadabba87e8d07fbae3e9d..28c55a66c78807ca413b8ea7ddd2e49b31fce260 100755 (executable)
@@ -454,10 +454,10 @@ class Media(MediaBase):
         strings = []
         if self.period:
             strings.append(self.period.name)
-        if self.course and self.course_type:
-            strings.append(self.course.code + ' ' + self.course_type.name)
-        elif self.course:
+        if self.course and :
             strings.append(self.course.code)
+        elif self.course_type:
+            strings.append(self.course_type.name)
         elif self.item.title:
             strings.append(self.item.title)
         else:
@@ -465,6 +465,7 @@ class Media(MediaBase):
         if self.rank:
             strings.append(str(self.rank))
 
+        strings.append(self.date_added)
         strings.append(self.mime_type)
         return ' - '.join(strings)