2👍
✅
You can create custom field and override to_python
method.
to_python
will be called before field’s clean, and you can convert any
to None
value there.
def to_python(self, value):
if value == 'any':
value = None
return super(CustomField, self).to_python(value)
Also you can use HTML5 placeholder
.
Source:stackexchange.com