furious-luke / django-address

A Django address model and field. Addresses may be specified by address components or by performing an automatic Google Maps lookup.
BSD 3-Clause "New" or "Revised" License
430 stars 180 forks source link

Fix RemovedInDjango41Warning on `default_app_config` #193

Open jonahgeorge opened 1 year ago

jonahgeorge commented 1 year ago

Since Django 3.2, the property has been deprecated as it is automatically detected by Django. Currently when django-address is loaded into a Django 3.2+ project, it throws deprecation warnings:

django.utils.deprecation.RemovedInDjango41Warning: 'address' defines default_app_config = 'address.apps.AddressConfig'. Django now detects this configuration automatically. You can remove default_app_config

The pattern in this PR can be found in other libraries that need to support wide ranges of Django versions: https://github.com/revsys/django-health-check/blob/master/health_check/db/__init__.py