Code

Ticket #4686: IPAddressField.diff

File IPAddressField.diff, 496 bytes (added by ian.g.kelly@…, 7 years ago)
Line 
1Index: django/db/models/fields/__init__.py
2===================================================================
3--- django/db/models/fields/__init__.py (revision 5539)
4+++ django/db/models/fields/__init__.py (working copy)
5@@ -800,6 +800,7 @@
6         return super(IntegerField, self).formfield(**defaults)
7 
8 class IPAddressField(Field):
9+    empty_strings_allowed = False
10     def __init__(self, *args, **kwargs):
11         kwargs['maxlength'] = 15
12         Field.__init__(self, *args, **kwargs)