django-geo 0.8

A Django application which manage administrative geographical data.

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)
city, __ = LocationType.objects.get_or_create(description='CITY')
roma, __  = Location.objects.get_or_create(country=italy,
                                            name ='Roma',
                                            type=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)
city, __ = LocationType.objects.get_or_create(description='CITY')
hudson, __  = Location.objects.get_or_create(country=us,
                                             name ='Hudson',
                                             type=city,
                                             area=columbia,
                                             is_administrative=True)
BSD

Author

sax

Pip

django-geo==0.8

Classifiers

  • Environment :: Web Environment
  • Framework :: Django
  • Intended Audience :: Developers
  • Operating System :: OS Independent
  • Programming Language :: Python
File Type Python Version Uploaded On Downloads
django-geo-0.8.tar.gz Source Aug. 2, 2014 1,419
Version Release Date
0.8 Aug. 2, 2014
0.7 April 25, 2014
0.7b1 Feb. 18, 2014
0.6 Oct. 27, 2013
0.5 Oct. 21, 2013
0.4.3 Feb. 19, 2014
0.4.2 Oct. 9, 2013
0.4.1 Oct. 9, 2013
0.3b1 Oct. 30, 2012
0.2.2.dev20120911141653 Sept. 12, 2012
0.2.2b1 Sept. 18, 2012
0.2.1b8 Sept. 11, 2012
0.2.1b6 Sept. 1, 2012
0.2.1b5 Aug. 22, 2012
0.2.1b3 Aug. 19, 2012
0.2.1b2 Aug. 9, 2012
0.2.1b1 July 5, 2012
0.2.1b0 July 5, 2012
0.2 June 27, 2012
0.1 May 27, 2012
0.0.1.dev712b2db7d5d2a750f91d3c7164b5a44d4e8b5b2a May 27, 2012
Date Package Version Action
Aug. 24, 2015, 11:03 p.m. django-geo 0.3b1 Release Created
Aug. 24, 2015, 11:03 p.m. django-geo 0.2 Release Created
Aug. 24, 2015, 11:03 p.m. django-geo 0.7b1 Release Created
Aug. 24, 2015, 11:03 p.m. django-geo 0.4.3 Release Created
Aug. 24, 2015, 11:03 p.m. django-geo 0.4.1 Release Created
Aug. 24, 2015, 11:03 p.m. django-geo 0.2.1b6 Release Created
Aug. 24, 2015, 11:03 p.m. django-geo 0.2.1b8 Release Created
Aug. 24, 2015, 11:03 p.m. django-geo 0.2.1b5 Release Created
Aug. 24, 2015, 11:03 p.m. django-geo 0.6 Release Created
Aug. 24, 2015, 11:03 p.m. django-geo 0.7 Release Created
Aug. 24, 2015, 11:03 p.m. django-geo 0.5 Release Created
Aug. 24, 2015, 11:03 p.m. django-geo 0.2.1b0 Release Created
Aug. 24, 2015, 11:03 p.m. django-geo 0.1 Release Created
Aug. 24, 2015, 11:03 p.m. django-geo 0.2.1b1 Release Created
Aug. 24, 2015, 11:03 p.m. django-geo 0.2.2.dev20120911141653 Release Created
Aug. 24, 2015, 11:03 p.m. django-geo 0.2.1b3 Release Created
Aug. 24, 2015, 11:03 p.m. django-geo 0.2.1b2 Release Created
Aug. 24, 2015, 11:03 p.m. django-geo 0.4.2 Release Created
Aug. 24, 2015, 11:03 p.m. django-geo 0.0.1.dev712b2db7d5d2a750f91d3c7164b5a44d4e8b5b2a Release Created
Aug. 24, 2015, 11:03 p.m. django-geo 0.8 Release Created
Aug. 24, 2015, 11:03 p.m. django-geo 0.2.2b1 Release Created
Aug. 24, 2015, 11:03 p.m. django-geo Package Created