Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

django-geo

https://secure.travis-ci.org/saxix/django-geo/djangorecipe.png?branch=master

A Django application which manage administrative geographical data. It use Modified Preorder Tree Traversal, provided by django-mptt https://github.com/django-mptt/django-mptt/

Geo is not intented to replace a GIS, but to manage all the cases where you have administrative trees, with a strict/lazy hierarchy.

Models

  • Country

  • Area

  • Location

  • AdministrativeAreaType

  • Currency

Examples

Three levels

italy = Country.objects.get(iso_code='IT')
regione, __ = italy.administrativeareatype_set.get_or_create(name='Regione')
provincia,__ = italy.administrativeareatype_set.get_or_create(name='Provincia',
                                                              parent=regione)
comune, __= italy.administrativeareatype_set.get_or_create(name='Comune',
                                                           parent=provincia)
lazio, __ = AdministrativeArea.objects.get_or_create(country=italy,
                                                     name ='Lazio',
                                                     type=regione)
roma_provincia, __ = AdministrativeArea.objects.get_or_create(country=italy,
                                                              name ='Provincia di Roma',
                                                              type=provincia,
                                                              parent=lazio)
roma_comune, __ = AdministrativeArea.objects.get_or_create(country=italy,
                                                            name ='Comune di Roma',
                                                            type=comune,
                                                            parent=roma_provincia)
roma, __  = Location.objects.get_or_create(country=italy,
                                            name ='Roma',
                                            type=Location.CITY,
                                            area=roma_comune)

Two levels,

us = Country.objects.get(iso_code='US')
state, __ = italy.administrativeareatype_set.get_or_create(name='State')
county,__ = italy.administrativeareatype_set.get_or_create(name='County',
                                                            parent=state)
ny, __ = AdministrativeArea.objects.get_or_create(country=us,
                                                    name ='New York',
                                                    type=state)
columbia, __ = AdministrativeArea.objects.get_or_create(country=us,
                                                        name ='Columbia',
                                                        type=county,
                                                        parent=ny)
hudson, __  = Location.objects.get_or_create(country=us,
                                             name ='Hudson',
                                             type=Location.CITY,
                                             area=columbia,
                                             is_administrative=True)

Metadata

Release files for django-geo 0.0.1.dev712b2db7d5d2a750f91d3c7164b5a44d4e8b5b2a

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-geo 0.0.1.dev712b2db7d5d2a750f91d3c7164b5a44d4e8b5b2a
File Size Uploaded Provenance Actions
django-geo-0.0.1.dev712b2db7d5d2a750f91d3c7164b5a44d4e8b5b2a.tar.gz 108.0 kB Without provenance Details for django-geo-0.0.1.dev712b2db7d5d2a750f91d3c7164b5a44d4e8b5b2a.tar.gz

Release files / django-geo-0.0.1.dev712b2db7d5d2a750f91d3c7164b5a44d4e8b5b2a.tar.gz

Download URL django-geo-0.0.1.dev712b2db7d5d2a750f91d3c7164b5a44d4e8b5b2a.tar.gz
Size 108.0 kB
Tags Source
SHA-256 checksum
How to use checksums
ef0a34dcdabc777c77c12648f4f9fa3e3de26126e1c83b40674d0dce6067e444
BLAKE2b-256 checksum
How to use checksums
81df9daa59804bd975941b5aebaca7ada39c55e58c7a090ba28627e19f84da40
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for django-geo 0.0.1.dev712b2db7d5d2a750f91d3c7164b5a44d4e8b5b2a

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page