Skip to content

Commit

Permalink
Change IPAddressField to GenericIPAddressField
Browse files Browse the repository at this point in the history
When using a PostgreSQL database and the client does not pass an IP address you get an inet error.  This is a known problem with PostgreSQL and the IPAddressField.

https://code.djangoproject.com/ticket/5622

It can be fixed by using a GenericIPAddressField instead.
  • Loading branch information
polvoblanco committed Jul 31, 2014
1 parent a6a3e47 commit 81bebc4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion axes/models.py
Expand Up @@ -6,7 +6,7 @@ class CommonAccess(models.Model):
max_length=255,
)

ip_address = models.IPAddressField(
ip_address = models.GenericIPAddressField(
verbose_name='IP Address',
null=True,
)
Expand Down

0 comments on commit 81bebc4

Please sign in to comment.