sábado, 22 de agosto de 2015

Django App for World Regions

I need a simple way to group countries in world's regions like *Northern America*, *Eastern Europe*, etc in my Django website.

After some unsuccess search I decide to created a project on Github and publish it as a package with a MIT licence in pypi.



Regions data are based in http://techydiary.com/region-yaml-for-django-fixtures/.

Django Countries package is used to handle countries.

Note: Currently this package don’t use GeoDjango neither map data.

Installation

  1. pip install django-world-regions
  2. Add world_regions to INSTALLED_APPS
  3. python manage.py migrate

Usage

from world_regions.models import Region

region = Region.objects.get(countries__country='US')
print region.name

No hay comentarios:

Publicar un comentario