mirror of
https://github.com/django/django.git
synced 2025-07-24 05:36:15 +00:00
Fixed #35091 -- Allowed GeoIP2 querying using IPv4Address/IPv6Address.
This commit is contained in:
parent
53fc6ac649
commit
cc56c22a24
4 changed files with 33 additions and 17 deletions
|
@ -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)
|
||||
|
||||
|
|
|
@ -59,6 +59,9 @@ Minor features
|
|||
* :class:`~django.contrib.gis.db.models.Collect` is now supported on MySQL
|
||||
8.0.24+.
|
||||
|
||||
* :class:`~django.contrib.gis.geoip2.GeoIP2` now allows querying using
|
||||
:class:`ipaddress.IPv4Address` or :class:`ipaddress.IPv6Address` objects.
|
||||
|
||||
:mod:`django.contrib.messages`
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue