Skip to content
Advertisement

Error while try to make widget to the form in django

I get an error when I try to add a widget to the form.

The error:

JavaScript

The model

JavaScript

The views

JavaScript

The form

class Video_form(forms.ModelForm):

JavaScript

Advertisement

Answer

You must assign valid widget in the Video_form:

JavaScript

forms.FileField and forms.ImageField are fields not widgets.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement