coderholic / django-cities

Countries and cities of the world for Django projects
MIT License
920 stars 374 forks source link

"slug" Field prevents django-cities update with existing data. #157

Closed emoitzi closed 7 years ago

emoitzi commented 7 years ago

The slug fields are required, but there are not migrations that fill in the data when applying the new migrations.

This effectively prevents an update in situations where purging the data is not possible.

blag commented 7 years ago

Thanks for bringing this to my attention; I'm not sure how I would implement a test for this situation, but I'll definitely keep it in mind for the future.

I have fixed this and pushed the fix to PyPI in version 0.5.0.3 for other users.

However, the fix for you may not be as straightforward. First off, install version 0.5.0.3 from PyPI (pip install --upgrade django-cities==0.5.0.3). Then run python manage.py showmigrations cities to list all migrations for this app.

Post back here if you have any further issues or questions with/about this.

Closing, but feel free to reopen if it's not fixed.