diff --git a/CHANGELOG.md b/CHANGELOG.md index 2be9464d..57d8fb13 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## [Unreleased] +- Avoid Deprectaion Warnings for Django versions >= 3.2 [Changed in Django 3.2](https://docs.djangoproject.com/en/3.2/ref/applications/#for-application-authors) + - Define `AppConfig.default_auto_field` as [required since Django 3.2](https://docs.djangoproject.com/en/3.2/releases/3.2/#customizing-type-of-auto-created-primary-keys). - Upgrade PyYAML to v6.0 diff --git a/pattern_library/__init__.py b/pattern_library/__init__.py index 1aa917c3..7ab4235d 100644 --- a/pattern_library/__init__.py +++ b/pattern_library/__init__.py @@ -1,6 +1,9 @@ +import django + from .context_modifiers import register_context_modifier -default_app_config = 'pattern_library.apps.PatternLibraryAppConfig' +if django.VERSION < (3, 2): + default_app_config = "pattern_library.apps.PatternLibraryAppConfig" __all__ = [ 'DEFAULT_SETTINGS',