Ejemplo n.º 1
0
 def handle(self, *args, **options):
     with transaction.atomic():
         try:
             for video in videos(settings.PROPOSAL_ROOT):
                 self.stdout.write(u'%s %s' %
                     ('Updating' if video.object.pk else 'Adding', video.object.title)
                 )
                 video.save()
         # display exception details
         except ProposalError as e:
             for cls, msg in e.args[0]:
                 self.stdout.write('%s - %s' % (cls.__name__, msg))
             raise
Ejemplo n.º 2
0
 def handle(self, *args, **options):
     with transaction.atomic():
         try:
             for video in videos(settings.PROPOSAL_ROOT):
                 self.stdout.write(
                     u'%s %s' %
                     ('Updating' if video.object.pk else 'Adding',
                      video.object.title))
                 video.save()
         # display exception details
         except ProposalError as e:
             for cls, msg in e.args[0]:
                 self.stdout.write('%s - %s' % (cls.__name__, msg))
             raise
Ejemplo n.º 3
0
 def save_videos(path):
     for video in videos(path):
         video.save()
Ejemplo n.º 4
0
 def save_videos(path):
     for video in videos(path):
         video.save()