I have a model field:

models.IPAddressField(verbose_name="access IP address", blank=True,
null=True)

that I attempt to save through a ModelForm. Despite the settings
above, instead of NULL, Django tries to save the empty field (mapped
to Postgres' inet type) as an empty string E'' , which is
inappropriate for that type. I *could* probably change the model type
to CharField and override the ModelForm widget as IPAddressField to
get form-level validation, and so the DB syntax error goes away, but
isn't that a bug?

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to