1

I have the following issue with the form

forms.py

class PublicHolidayForm(forms.ModelForm):
        date = forms.DateField(label='Date', required=True, widget=DateTimePicker(options={"format": "YYYY-MM-DD"}),input_formats=["%Y-%m-%d"])
        description = forms.CharField(label='Description',  max_length=250, widget=forms.Textarea(attrs={'rows':4, 'cols':50}))
        class Meta:
            model = PublicHoliday
            fields = ("date","description")

whereby

date = forms.DateField(label='Date', required=True, widget=DateTimePicker(options={"format": "YYYY-MM-DD"}),input_formats=["%Y-%m-%d"])

causes the problem

render() got an unexpected keyword argument 'renderer' 

How can i resolve this ?

I think its something to do with

https://docs.djangoproject.com/en/2.1/releases/2.1/

Support for Widget.render() methods without the renderer argument is removed.
Axil
  • 3,606
  • 10
  • 62
  • 136

0 Answers0