also migrate uploaded srt files

This commit is contained in:
j 2013-03-26 10:33:47 +00:00
parent 977abe6dc4
commit d0c59e05c2

View file

@ -12,6 +12,9 @@ class Migration(DataMigration):
for s in orm['archive.Stream'].objects.all(): for s in orm['archive.Stream'].objects.all():
s.video.name = s.video.name.replace('files/', 'media/') s.video.name = s.video.name.replace('files/', 'media/')
s.save() s.save()
for f in orm['archive.File'].objects.exclude(data=''):
f.data.name = f.data.name.replace('files/', 'media/')
f.save()
def backwards(self, orm): def backwards(self, orm):
"Write your backwards methods here." "Write your backwards methods here."