Open
Description
Checklist
- I have verified that I am using a GIS-enabled database, such as PostGIS or Spatialite.
- I have verified that that issue exists against the
master
branch of django-cities. - I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
- I have reduced the issue to the simplest possible case.
- I have included a failing test as a pull request. (If you are unable to do so we can still accept the issue.)
Steps to reproduce
Fresh install, add CustomCountryModel as it is in the example from django-cities, run makemigrations.
INSTALLED_APPS = (
...
# I tried both order
'myapp',
'cities',
)
Environment:
Python 3.5.2
Django==1.10.5
django-cities==0.5.0.3 ( installed from github, branch master )
Expected behavior
I think it should do the migration files :)
Actual behavior
host:~#./manage.py makemigrations
SystemCheckError: System check identified some issues:
ERRORS:
<myapp>.CustomCountryModel.alt_names: (fields.E300) Field defines a relation with model 'AlternativeName', which is either not installed, or is abstract.
<myapp>.CustomCountryModel.alt_names: (fields.E307) The field <myapp>.CustomCountryModel.alt_names was declared with a lazy reference to '<myapp>.alternativename', but app '<myapp>' doesn't provide model 'alternativename'.
<myapp>.CustomCountryModel_alt_names.alternativename: (fields.E307) The field <myapp>.CustomCountryModel_alt_names.alternativename was declared with a lazy reference to '<myapp>.alternativename', but app '<myapp>' doesn't provide model 'alternativename'.
For a quick fix I moved the AlternativeNames model above Place and removed the lazy reference of AlternativeName
Let me know if you need more details.