]> git.parisson.com Git - teleforma.git/commitdiff
update import scripts
authorGuillaume Pellerin <yomguy@parisson.com>
Tue, 30 Dec 2014 21:23:38 +0000 (22:23 +0100)
committerGuillaume Pellerin <yomguy@parisson.com>
Tue, 30 Dec 2014 21:23:38 +0000 (22:23 +0100)
teleforma/management/commands/teleforma-import-seminar-media-update.py
teleforma/management/commands/teleforma-import-seminar-media.py

index 023fff9b0fd3d6dd99fa14bf55565463c94111c4..f4e55699628031a3b42e9f5baac95d38bfc1bcc6 100644 (file)
@@ -107,6 +107,9 @@ class Command(BaseCommand):
         domain = args[4]
         logger = Logger(log_file)
 
+        self.site.domain = domain
+        self.site.save()
+
         organization = Organization.objects.get(name=organization_name)
         period = Period.objects.get(name=period_name)
         self.media_dir = media_dir
index dfd9b35dd22cfa7b5aeda534dd78f33ab5aa0e7f..442b0efcc6a8e542632421af3a1795d65df05580 100644 (file)
@@ -120,6 +120,7 @@ class Command(BaseCommand):
                 name = os.path.splitext(filename)[0]
                 ext = os.path.splitext(filename)[1][1:]
                 root_list = root.split(os.sep)
+                print root + os.sep + filename
 
                 if ext in self.original_format and not 'preview' in root_list \
                             and not 'preview' in filename and not 'Preview' in filename and filename[0] != '.':
@@ -164,7 +165,6 @@ class Command(BaseCommand):
                             break
 
                     if not exist:
-                        print root + os.sep + filename
                         logger.logger.info(seminar.public_url())
                         logger.logger.info(path)
                         if not seminar in seminars: