1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #35091 -- Allowed GeoIP2 querying using IPv4Address/IPv6Address.

This commit is contained in:
Nick Pope
2024-01-07 07:15:40 +00:00
committed by GitHub
parent 53fc6ac649
commit cc56c22a24
4 changed files with 33 additions and 17 deletions

View File

@@ -107,10 +107,11 @@ and given cache setting.
Querying
--------
All the following querying routines may take either a string IP address
or a fully qualified domain name (FQDN). For example, both
``'205.186.163.125'`` and ``'djangoproject.com'`` would be valid query
parameters.
All the following querying routines may take an instance of
:class:`~ipaddress.IPv4Address` or :class:`~ipaddress.IPv6Address`, a string IP
address, or a fully qualified domain name (FQDN). For example,
``IPv4Address("205.186.163.125")``, ``"205.186.163.125"``, and
``"djangoproject.com"`` would all be valid query parameters.
.. method:: GeoIP2.city(query)