#35100: Simplify initialization of databases in the GeoIP2 wrapper
-------------------------------------+-------------------------------------
Reporter: Nick Pope | Owner: Nick Pope
Type: | Status: assigned
Cleanup/optimization |
Component: GIS | Version: dev
Severity: Normal | Keywords: geoip2
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
The initialization of the wrapper around the GeoIP2 databases is
overcomplicated and should be simplified.
Currently when calling `GeoIP2.city()` and `GeoIP2.country()` the city and
country databases will be used respectively, but this is unnecessary as
the country database is merely a subset of the city database. It should be
possible to provide a path and attempt to open a database from three
possible candidates: `path`, `path / city`, and `path / country`. While a
minor incompatibility in that the city database may be used instead, this
also reduces the potential for mixing data from two different databases
where one might be outdated.
--
Ticket URL: <https://code.djangoproject.com/ticket/35100>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107018cf30c13c0-bd04fbd4-fe4a-4262-87c9-199dc9764232-000000%40eu-central-1.amazonses.com.