yourlabs / django-cities-light

A simple app providing three models: Country, Region and City model. Also provided, a command to insert or update data from geonames database dumps. Status: stable.
http://django-cities-light.rtfd.org/
MIT License
335 stars 126 forks source link

The migration to populate the database doesn't work with SQLite #154

Open quorumcyber opened 7 years ago

quorumcyber commented 7 years ago

requirements.txt: Django==1.11.1 django-cities-light==3.3.0

settings.py (default entry for the sqlite database): DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), 'CONN_MAX_AGE': 600, } }

Any cities-light settings used in settings.py or any parameter used in command line when doing ./manage.py cities_light never changes the fact that the countries or the cities are never populated. There are no errors in the execution, and the output is exactly the same when you use Postgress. However, the tables never get any data.

The moment you switch Django's database to Postgress, everything works as a charm. I use SQLite for development, but is not possible to use cities-light with SQLite.

max-arnold commented 7 years ago

Are the tests pass on your machine? Try something like this (see tox.ini for possible test environments):

tox -e py27-django111-sqlite