-
Notifications
You must be signed in to change notification settings - Fork 379
Open
Labels
Description
Checklist
Hello,
Is it possible to make relation between cities and regions? Seems region field is None
Steps to reproduce
In [1]: from cities.models import City
In [2]: City.objects.filter(name='Athens')
Out[2]: <QuerySet [<City: Athens>, <City: Athens>, <City: Athens>, <City: Athens>, <City: Athens>, <City: Athens>]>
In [3]: [(x.country, x.region) for x in City.objects.filter(name='Athens')]
Out[3]:
[(<Country: Greece>, None),
(<Country: United States>, None),
(<Country: United States>, None),
(<Country: United States>, None),
(<Country: United States>, None),
(<Country: United States>, None)]
Regions is exists:
In [1]: from cities.models import Region, City
In [2]: Region.objects.count()
Out[2]: 3918
In [7]: City.objects.filter(region__isnull=False)
Out[7]: <QuerySet []>
Version of cities: django-cities==0.5.0.6