My form's is_valid method returns false
<p>I have a form as below :</p>

<pre><code>class CookDuty(forms.Form ):
    # cook = None
    def __init__(self, *args, **kwargs):
        cook = kwargs.pop('cook')
        super(CookDuty, self).__init__(*args, **kwargs)
        self.fields['duty'].choices = foods_for_cook(cook)
    duty = forms.ChoiceField(widget=forms.CheckboxSelectMultiple, required=False)
</code></pre>

<p>I have used it in a view as below, but <code>form.is_valid</code> returns false! I have checked <code>form.errors</code> and it's empty, <code>form.data</code> is empty, and form.is_bound is <code>False</code>.</p>

<pre><code>def duty_list_cook(request):
    if request.method == 'POST':
        c = Cook.objects.all()[0]
        form = CookDuty(cook=c)
        if form.is_valid():
            print(form.cleaned_data)
            return render(request, 'employee/cook_duty.html', {'form':form})

    else:
        c = Cook.objects.all()[0]
        form = CookDuty(cook=c)
    return render (request, 'employee/cook_duty.html', {'form':form})
</code></pre>