0👍
proper way to refer a field in form is like this:
self.fields['myfield']
so, in your case, the null check should go like this
self.fields['myfield'].value is None
on the other note, don’t use reserved/near to reserved words like ‘field’ for naming your fields.
- [Django]-Django with django-nose: two identical settings files with different behavior in running test command
- [Django]-Humanize in django/python, how to translate
- [Django]-Problem rendering a Django form field with different representation
- [Django]-How might I join two unrelated Django models via distance?
Source:stackexchange.com