擅长:python、mysql、java
<blockquote>
<p>If the model field has blank=True, then required is set to False on the form field. Otherwise, required=True</p>
</blockquote>
<p>这里这么说:<a href="http://docs.djangoproject.com/en/dev/topics/forms/modelforms/" rel="noreferrer">http://docs.djangoproject.com/en/dev/topics/forms/modelforms/</a></p>
<p>看起来你做得很好。
您可以检查<code>self.fields['end'].required</code>的值。</p>