coderholic / django-cities

Countries and cities of the world for Django projects
MIT License
913 stars 377 forks source link

Use swapper for reference to AlternativeName #203

Open leibowitz opened 5 years ago

leibowitz commented 5 years ago

Fix for #165

emilepetrone commented 5 years ago

I'm getting this when I override Cities. Could this be required for all the BaseModels?

locations.CityModel.alt_names: (fields.E300) Field defines a relation with model 'AlternativeName', which is either not installed, or is abstract.
locations.CityModel.alt_names: (fields.E307) The field locations.CityModel.alt_names was declared with a lazy reference to 'locations.alternativename', but app 'locations' doesn't provide model 'alternativename'.
locations.CityModel_alt_names.alternativename: (fields.E307) The field locations.CityModel_alt_names.alternativename was declared with a lazy reference to 'locations.alternativename', but app 'locations' doesn't provide model 'alternativename'.
blag commented 5 years ago

Can you remove Python 3.3 from the tested versions and fix the issues with Python 3.5 and 3.6?

leibowitz commented 5 years ago

Are you saying you think this change affects the failing test?

AttributeError: /usr/lib/libgdal.so.1: undefined symbol: GDALGetMetadataDomainList

Doesn't sound like this failing error has anything to do with this change

blag commented 5 years ago

No, I am saying I don't really have time to troubleshoot this. I'm trying to handoff maintaining this project to somebody else. Sorry I don't have better news for you. 😞

blag commented 5 years ago

Oh, I see that the failed tests are for Django master - nevermind don't worry about those.

Please fix or remove the tests for Python 3.3 though, since that is EOL I don't think we need to continue supporting it.

leibowitz commented 5 years ago

https://github.com/coderholic/django-cities/pull/209 Is that it?

zvolsky commented 3 years ago

I cannot start after this change. makemigrations run well for both cities and custom_cities applications, but migrate ends with CircularDependencyError like django.db.migrations.exceptions.CircularDependencyError: cities.0008_add_code_to_district, cities.0009_add_slug_fields_to_models, cities.0010_adjust_unique_attributes, cities.0011_auto_20180108_0706, cities.0012_auto_20200828_1518, mz_cities.0001_initial, cities.0001_initial, cities.0002_continent_models_and_foreign_keys, cities.0003_add_verbose_name_and_related_names, cities.0004_rename_languages_to_language_codes, cities.0005_add_foreignkeys_to_postalcode, cities.0006_typify_alt_names_and_add_is_historic, cities.0007_add_currency_and_postal_code_fields_to_country_model