mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Fixed #30461 -- Made GeoIP2 and GEOIP_PATH setting accept pathlib.Path as library path.
Thanks Nikita Krokosh for the initial patch.
This commit is contained in:
parent
88c0b907e7
commit
eed2e740f7
4 changed files with 24 additions and 7 deletions
|
@ -86,6 +86,10 @@ Keyword Arguments Description
|
|||
the :setting:`GEOIP_CITY` setting.
|
||||
=================== =======================================================
|
||||
|
||||
.. versionchanged:: 3.0
|
||||
|
||||
Support for :class:`pathlib.Path` ``path`` was added.
|
||||
|
||||
Methods
|
||||
=======
|
||||
|
||||
|
@ -151,10 +155,14 @@ Settings
|
|||
``GEOIP_PATH``
|
||||
--------------
|
||||
|
||||
A string specifying the directory where the GeoIP data files are
|
||||
located. This setting is *required* unless manually specified
|
||||
A string or :class:`pathlib.Path` specifying the directory where the GeoIP data
|
||||
files are located. This setting is *required* unless manually specified
|
||||
with ``path`` keyword when initializing the :class:`GeoIP2` object.
|
||||
|
||||
.. versionchanged:: 3.0
|
||||
|
||||
Support for :class:`pathlib.Path` was added.
|
||||
|
||||
.. setting:: GEOIP_COUNTRY
|
||||
|
||||
``GEOIP_COUNTRY``
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue