On Tue, Jul 14, 2015 at 9:15 PM, Robin Lery <robinl...@gmail.com> wrote: > Yes. That time you were the one to guide me. I was looking at other projects > after that. > > I am just confused on how to get the video.mp4_720 to be the converted > video. Will you please help. >
This is explained in the docs for FileField, you need to create a django.core.files.File subclass, and save() it on the FieldFile object that is returned when you access the FileField field on your model instance. Eg: from django.core.files import File fp = open('/path/to/file') myfile = File(fp) my_obj.mp4_720.save(name="....", content=myfile) https://docs.djangoproject.com/en/1.8/ref/models/fields/#django.db.models.fields.files.FieldFile.save Also, you should not pass objects as arguments to celery tasks, you should instead pass the id of the object and fetch the object again in the celery task. Cheers Tom -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAFHbX1J%2BGf_hRB7ERLonXpT_jhDqX8NkEYtV5qnftyMgKvJ0OA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.