Raising RemovedInDjango20Warning
seocam opened this issue · 5 comments
seocam commented
venv/lib/python3.4/site-packages/cities/models.py:62: RemovedInDjango20Warning: The GeoManager class is deprecated. Simply use a normal manager once you have replaced all calls to GeoQuerySet methods by annotations.
venv/lib/python3.4/site-packages/cities/models.py:115: RemovedInDjango20Warning: on_delete will be a required arg for ForeignKey in Django 2.0. Set it to models.CASCADE on models and in existing migrations if you want to maintain the current default behavior. See https://docs.djangoproject.com/en/1.11/ref/models/fields/#django.db.models.ForeignKey.on_delete
null=True, related_name='countries')
venv/lib/python3.4/site-packages/cities/models.py:150: RemovedInDjango20Warning: on_delete will be a required arg for ForeignKey in Django 2.0. Set it to models.CASCADE on models and in existing migrations if you want to maintain the current default behavior. See https://docs.djangoproject.com/en/1.11/ref/models/fields/#django.db.models.ForeignKey.on_delete
related_name='regions')
venv/lib/python3.4/site-packages/cities/models.py:173: RemovedInDjango20Warning: on_delete will be a required arg for ForeignKey in Django 2.0. Set it to models.CASCADE on models and in existing migrations if you want to maintain the current default behavior. See https://docs.djangoproject.com/en/1.11/ref/models/fields/#django.db.models.ForeignKey.on_delete
region = models.ForeignKey(Region, related_name='subregions')
venv/lib/python3.4/site-packages/cities/models.py:196: RemovedInDjango20Warning: on_delete will be a required arg for ForeignKey in Django 2.0. Set it to models.CASCADE on models and in existing migrations if you want to maintain the current default behavior. See https://docs.djangoproject.com/en/1.11/ref/models/fields/#django.db.models.ForeignKey.on_delete
related_name='cities')
venv/lib/python3.4/site-packages/cities/models.py:197: RemovedInDjango20Warning: on_delete will be a required arg for ForeignKey in Django 2.0. Set it to models.CASCADE on models and in existing migrations if you want to maintain the current default behavior. See https://docs.djangoproject.com/en/1.11/ref/models/fields/#django.db.models.ForeignKey.on_delete
venv/lib/python3.4/site-packages/cities/models.py:198: RemovedInDjango20Warning: on_delete will be a required arg for ForeignKey in Django 2.0. Set it to models.CASCADE on models and in existing migrations if you want to maintain the current default behavior. See https://docs.djangoproject.com/en/1.11/ref/models/fields/#django.db.models.ForeignKey.on_delete
subregion = models.ForeignKey(Subregion, null=True, blank=True, related_name='cities')
venv/lib/python3.4/site-packages/cities/models.py:232: RemovedInDjango20Warning: on_delete will be a required arg for ForeignKey in Django 2.0. Set it to models.CASCADE on models and in existing migrations if you want to maintain the current default behavior. See https://docs.djangoproject.com/en/1.11/ref/models/fields/#django.db.models.ForeignKey.on_delete
city = models.ForeignKey(swapper.get_model_name('cities', 'City'), related_name='districts')
venv/lib/python3.4/site-packages/cities/models.py:280: RemovedInDjango20Warning: on_delete will be a required arg for ForeignKey in Django 2.0. Set it to models.CASCADE on models and in existing migrations if you want to maintain the current default behavior. See https://docs.djangoproject.com/en/1.11/ref/models/fields/#django.db.models.ForeignKey.on_delete
related_name='postal_codes')
venv/lib/python3.4/site-packages/cities/models.py:287: RemovedInDjango20Warning: on_delete will be a required arg for ForeignKey in Django 2.0. Set it to models.CASCADE on models and in existing migrations if you want to maintain the current default behavior. See https://docs.djangoproject.com/en/1.11/ref/models/fields/#django.db.models.ForeignKey.on_delete
venv/lib/python3.4/site-packages/cities/models.py:288: RemovedInDjango20Warning: on_delete will be a required arg for ForeignKey in Django 2.0. Set it to models.CASCADE on models and in existing migrations if you want to maintain the current default behavior. See https://docs.djangoproject.com/en/1.11/ref/models/fields/#django.db.models.ForeignKey.on_delete
subregion = models.ForeignKey(Subregion, blank=True, null=True, related_name='postal_codes')
venv/lib/python3.4/site-packages/cities/models.py:290: RemovedInDjango20Warning: on_delete will be a required arg for ForeignKey in Django 2.0. Set it to models.CASCADE on models and in existing migrations if you want to maintain the current default behavior. See https://docs.djangoproject.com/en/1.11/ref/models/fields/#django.db.models.ForeignKey.on_delete
blank=True, null=True, related_name='postal_codes')
venv/lib/python3.4/site-packages/cities/models.py:291: RemovedInDjango20Warning: on_delete will be a required arg for ForeignKey in Django 2.0. Set it to models.CASCADE on models and in existing migrations if you want to maintain the current default behavior. See https://docs.djangoproject.com/en/1.11/ref/models/fields/#django.db.models.ForeignKey.on_delete
district = models.ForeignKey(District, blank=True, null=True, related_name='postal_codes')
venv/lib/python3.4/site-packages/cities/models.py:293: RemovedInDjango20Warning: The GeoManager class is deprecated. Simply use a normal manager once you have replaced all calls to GeoQuerySet methods by annotations.
objects = models.GeoManager()
blag commented
Yes, this is a warning, not an error. I will fix this once Django 2.0 comes out.
seocam commented
This is really annoying on travis and other CIs. Making warnings silent doesn't smell as a good solution either. Any advises?
seocam commented
If I send a PR fixing the warnings and keeping the same behavior would you mind accepting it?
blag commented
Yes, that would be great. Thanks! 😄