escaped / django-video-encoding

django-video-encoding helps to convert your videos into different formats and resolutions.
BSD 3-Clause "New" or "Revised" License
116 stars 45 forks source link

Is it possible to use this fields with forms in a ClassedBase View? #10

Closed vaaceves closed 6 years ago

vaaceves commented 6 years ago

I am working on a video platform and i am having troubles to upload a video via forms.

escaped commented 6 years ago

Could you be a bit more specific, please? What have you tried? Is there an error message? Do have trouble in general to use this module?

Your issue might be related to #1, but I have not yet used this module in another place than the django-admin.

vaaceves commented 6 years ago

I am using a CreateView with a form_valid function to get the data for my model, model that have a attribute called Video = VideoField(...) When i want to Post de Form, it fails. I removed the attribute file just for a test and the form submit was successful. On the admin site, works perfectly, but when i use it on a form in any of my templates, the post fails (Sorry for the crappy english)

escaped commented 6 years ago

Hey,

I really thought it might be a problem related to the VideoField and its FormField, but I could not reproduce your issue. See https://github.com/escaped/django-video-encoding/compare/form_example for a sample implementation - the Video is correctly stored into the database.

Either I misunderstood your problem or it lies somewhere else within your application.

escaped commented 6 years ago

I am closing this issue. If you still encounter problems, feel free to reach out again :)