[Django] #35092: Expose additional data in responses from geoip2 queries.

13 views
Skip to first unread message

Django

unread,
Jan 6, 2024, 12:12:33 PM1/6/24
to django-...@googlegroups.com
#35092: Expose additional data in responses from geoip2 queries.
---------------------------------------+---------------------------
Reporter: Nick Pope | Owner: Nick Pope
Type: New feature | Status: assigned
Component: GIS | Version: dev
Severity: Normal | Keywords: geoip2
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
---------------------------------------+---------------------------
I'd like to expose some of the data missing in the responses returned for
both country and city queries.

For country responses, we should return `continent_code`,
`continent_name`, and `is_in_european_union`'''^1^'''.

For city responses, we should return `accuracy_radius` and `region_name`.
We should also rename `region` to `region_code` and `dma_code`'''^2^''' to
`metro_code`. ''(In my initial patch I've kept the old names around for
backward compatibility, but perhaps we should deprecate those keys?)''

----
'''^1^''' ''This was already added for city responses in #30447.''
'''^2^''' ''IIRC this is an old name for `metro_code` that was used in the
old v1 of the GeoIP library...''

--
Ticket URL: <https://code.djangoproject.com/ticket/35092>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jan 6, 2024, 12:20:10 PM1/6/24
to django-...@googlegroups.com
#35092: Expose additional data in responses from geoip2 queries.
-----------------------------+--------------------------------------

Reporter: Nick Pope | Owner: Nick Pope
Type: New feature | Status: assigned
Component: GIS | Version: dev
Severity: Normal | Resolution:

Keywords: geoip2 | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+--------------------------------------
Changes (by Nick Pope):

* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/17706 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/35092#comment:1>

Django

unread,
Jan 6, 2024, 1:19:27 PM1/6/24
to django-...@googlegroups.com
#35092: Expose additional data in responses from geoip2 queries.
-----------------------------+-------------------------------------
Reporter: Nick Pope | Owner: Nick Pope
Type: New feature | Status: assigned
Component: GIS | Version: dev
Severity: Normal | Resolution:
Keywords: geoip2 | Triage Stage: Accepted

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/35092#comment:2>

Django

unread,
Jan 10, 2024, 5:58:57 AM1/10/24
to django-...@googlegroups.com
#35092: Expose additional data in responses from geoip2 queries.
-----------------------------+---------------------------------------------

Reporter: Nick Pope | Owner: Nick Pope
Type: New feature | Status: assigned
Component: GIS | Version: dev
Severity: Normal | Resolution:
Keywords: geoip2 | Triage Stage: Ready for checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+---------------------------------------------
Changes (by Mariusz Felisiak):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/35092#comment:3>

Django

unread,
Jan 10, 2024, 6:09:54 AM1/10/24
to django-...@googlegroups.com
#35092: Expose additional data in responses from geoip2 queries.
-----------------------------+---------------------------------------------
Reporter: Nick Pope | Owner: Nick Pope
Type: New feature | Status: closed
Component: GIS | Version: dev
Severity: Normal | Resolution: fixed

Keywords: geoip2 | Triage Stage: Ready for checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+---------------------------------------------
Changes (by GitHub <noreply@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"f50184a84b885f4474d5030af968195219a360b9" f50184a8]:
{{{
#!CommitTicketReference repository=""
revision="f50184a84b885f4474d5030af968195219a360b9"
Fixed #35092 -- Exposed extra fields for GeoIP2.country() and
GeoIP2.city() responses.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/35092#comment:4>

Reply all
Reply to author
Forward
0 new messages