django-cities-light 3.1.2

Simple alternative to django-cities

django-cities-light -- Simple django-cities alternative

This add-on provides models and commands to import country, region/state, and city data in your database.

The data is pulled from GeoNames and contains cities, regions/states and countries.

Spatial query support is not required by this application.

This application is very simple and is useful if you want to make a simple address book for example. If you intend to build a fully featured spatial database, you should use django-cities.

Requirements:

  • Python 2.7 or 3.3,
  • Django >= 1.6 for django-cities-light 3.x.x
  • or Django >= 1.4 <= 1.6 for django-cities-light 2.x.x
  • MySQL (better in 3.x.x) or PostgreSQL or SQLite.
  • django-south is optionnal, but recommended, for django <= 1.6

Yes, for some reason, code that used to work on MySQL (not without pain xD) does not work anymore. So we're now using django.db.transaction.atomic which comes from Django 1.6 just to support MySQL quacks.

Upgrade

See CHANGELOG.

Installation

Install django-cities-light:

pip install django-cities-light

Or the development version:

pip install -e git+git@github.com:yourlabs/django-cities-light.git#egg=cities_light

Add cities_light to your INSTALLED_APPS.

Configure filters to exclude data you don't want, ie.:

CITIES_LIGHT_TRANSLATION_LANGUAGES = ['fr', 'en']
CITIES_LIGHT_INCLUDE_COUNTRIES = ['FR']

Now, run syncdb, it will only create tables for models that are not disabled:

./manage.py syncdb

Note that this project supports django-south. It is recommended that you use south too else you're on your own for migrations/upgrades.

!DANGER!

Since version 2.4.0, django-cities-light uses django migrations by default. This means that django-south users should add to settings:

SOUTH_MIGRATION_MODULES = {
    'cities_light': 'cities_light.south_migrations',
}

Data update

Finally, populate your database with command:

./manage.py cities_light

This command is well documented, consult the help with:

./manage.py help cities_light
MIT

Author

James Pic,Dominick Rivard,Alexey Evseev

Pip

django-cities-light==3.1.2

Classifiers

  • Development Status :: 5 - Production/Stable
  • Environment :: Web Environment
  • Framework :: Django
  • Intended Audience :: Developers
  • License :: OSI Approved :: MIT License
  • Operating System :: OS Independent
  • Programming Language :: Python
  • Programming Language :: Python :: 2
  • Programming Language :: Python :: 3
  • Topic :: Software Development :: Libraries :: Python Modules
  • Topic :: Internet :: WWW/HTTP
File Type Python Version Uploaded On Downloads
django-cities-light-3.1.2.tar.gz Source April 2, 2015 5,387
Version Release Date
3.1.2 April 2, 2015
3.1.0 March 3, 2015
3.0.5 Feb. 19, 2015
3.0.4 Jan. 28, 2015
3.0.3 Jan. 21, 2015
3.0.2 Nov. 24, 2014
3.0.1 Nov. 6, 2014
3.0.0 Nov. 1, 2014
2.4.3 Oct. 1, 2014
2.4.2 April 29, 2014
2.4.1 April 27, 2014
2.4.0 April 27, 2014
2.3.1 April 6, 2014
2.3.0 March 6, 2014
2.1.13 Feb. 27, 2014
2.1.12 Feb. 23, 2014
2.1.11 Feb. 2, 2014
2.1.10 Jan. 28, 2014
2.1.9 Jan. 27, 2014
2.1.8 Dec. 12, 2013
2.1.7 Dec. 12, 2013
2.1.6 Nov. 22, 2013
2.1.5 Nov. 3, 2013
2.1.4 Nov. 3, 2013
2.1.3 Nov. 2, 2013
2.1.2 Nov. 2, 2013
2.1.1 Sept. 30, 2013
2.1.0 Sept. 27, 2013
2.0.9 July 30, 2013
2.0.8 June 26, 2013
2.0.7 Oct. 26, 2012
2.0.6 Oct. 26, 2012
2.0.5 Oct. 26, 2012
2.0.4 Aug. 22, 2012
2.0.2 July 12, 2012
2.0.1 July 10, 2012
2.0.0 July 10, 2012
1.9.4 June 25, 2012
1.9.3 June 12, 2012
1.9.2 June 12, 2012
1.9.1 June 10, 2012
1.9.0 June 8, 2012
1.8 June 5, 2012
1.7rc2 June 5, 2012
1.7 May 28, 2012
1.5.1 May 24, 2012
1.5 May 22, 2012
1.4 May 20, 2012
1.3 May 20, 2012
1.2 May 11, 2012
1.1 May 11, 2012
1.0 May 11, 2012
0.19 Aug. 24, 2015
Date Package Version Action
Aug. 24, 2015, 11 p.m. django-cities-light 1.5 Release Created
Aug. 24, 2015, 11 p.m. django-cities-light 1.1 Release Created
Aug. 24, 2015, 11 p.m. django-cities-light 2.1.13 Release Created
Aug. 24, 2015, 11 p.m. django-cities-light 2.1.12 Release Created
Aug. 24, 2015, 11 p.m. django-cities-light 2.1.11 Release Created
Aug. 24, 2015, 11 p.m. django-cities-light 2.1.10 Release Created
Aug. 24, 2015, 11 p.m. django-cities-light 1.7rc2 Release Created
Aug. 24, 2015, 11 p.m. django-cities-light 2.0.4 Release Created
Aug. 24, 2015, 11 p.m. django-cities-light 1.4 Release Created
Aug. 24, 2015, 11 p.m. django-cities-light 0.19 Release Created
Aug. 24, 2015, 11 p.m. django-cities-light 2.4.0 Release Created
Aug. 24, 2015, 11 p.m. django-cities-light 2.4.1 Release Created
Aug. 24, 2015, 11 p.m. django-cities-light 2.4.2 Release Created
Aug. 24, 2015, 11 p.m. django-cities-light 2.4.3 Release Created
Aug. 24, 2015, 11 p.m. django-cities-light 3.0.5 Release Created
Aug. 24, 2015, 11 p.m. django-cities-light 1.5.1 Release Created
Aug. 24, 2015, 11 p.m. django-cities-light 2.3.1 Release Created
Aug. 24, 2015, 11 p.m. django-cities-light 2.3.0 Release Created
Aug. 24, 2015, 11 p.m. django-cities-light 1.0 Release Created
Aug. 24, 2015, 11 p.m. django-cities-light 1.9.4 Release Created
Aug. 24, 2015, 11 p.m. django-cities-light 1.7 Release Created
Aug. 24, 2015, 11 p.m. django-cities-light 1.9.2 Release Created
Aug. 24, 2015, 11 p.m. django-cities-light 1.9.3 Release Created
Aug. 24, 2015, 11 p.m. django-cities-light 1.9.0 Release Created
Aug. 24, 2015, 11 p.m. django-cities-light 1.9.1 Release Created
Aug. 24, 2015, 11 p.m. django-cities-light 1.3 Release Created
Aug. 24, 2015, 11 p.m. django-cities-light 2.0.6 Release Created
Aug. 24, 2015, 11 p.m. django-cities-light 2.0.0 Release Created
Aug. 24, 2015, 11 p.m. django-cities-light 2.0.1 Release Created
Aug. 24, 2015, 11 p.m. django-cities-light 2.0.2 Release Created
Aug. 24, 2015, 11 p.m. django-cities-light 2.1.5 Release Created
Aug. 24, 2015, 11 p.m. django-cities-light 2.1.4 Release Created
Aug. 24, 2015, 11 p.m. django-cities-light 2.1.7 Release Created
Aug. 24, 2015, 11 p.m. django-cities-light 2.1.6 Release Created
Aug. 24, 2015, 11 p.m. django-cities-light 2.1.1 Release Created
Aug. 24, 2015, 11 p.m. django-cities-light 2.1.0 Release Created
Aug. 24, 2015, 11 p.m. django-cities-light 2.1.3 Release Created
Aug. 24, 2015, 11 p.m. django-cities-light 2.1.2 Release Created
Aug. 24, 2015, 11 p.m. django-cities-light 1.2 Release Created
Aug. 24, 2015, 11 p.m. django-cities-light 2.1.9 Release Created
Aug. 24, 2015, 11 p.m. django-cities-light 2.1.8 Release Created
Aug. 24, 2015, 11 p.m. django-cities-light 2.0.8 Release Created
Aug. 24, 2015, 11 p.m. django-cities-light 2.0.9 Release Created
Aug. 24, 2015, 11 p.m. django-cities-light 2.0.5 Release Created
Aug. 24, 2015, 11 p.m. django-cities-light 1.8 Release Created
Aug. 24, 2015, 11 p.m. django-cities-light 3.0.1 Release Created
Aug. 24, 2015, 11 p.m. django-cities-light 3.0.0 Release Created
Aug. 24, 2015, 11 p.m. django-cities-light 3.0.3 Release Created
Aug. 24, 2015, 11 p.m. django-cities-light 3.0.2 Release Created
Aug. 24, 2015, 11 p.m. django-cities-light 3.1.0 Release Created
Aug. 24, 2015, 11 p.m. django-cities-light 3.0.4 Release Created
Aug. 24, 2015, 11 p.m. django-cities-light 3.1.2 Release Created
Aug. 24, 2015, 11 p.m. django-cities-light 2.0.7 Release Created
Aug. 24, 2015, 11 p.m. django-cities-light Package Created