Skip to content

Commit 9b6a187

Browse files
committed
default_app_config application variable is deprecated in Django 3.2
1 parent 844e9dd commit 9b6a187

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

rest_framework/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import django
2+
13
r"""
24
______ _____ _____ _____ __
35
| ___ \ ___/ ___|_ _| / _| | |
@@ -23,6 +25,10 @@
2325
ISO_8601 = 'iso-8601'
2426

2527

28+
if django.VERSION < (3, 2):
29+
default_app_config = 'rest_framework.apps.RestFrameworkConfig'
30+
31+
2632
class RemovedInDRF313Warning(DeprecationWarning):
2733
pass
2834

rest_framework/authtoken/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import django
2+
if django.VERSION < (3, 2):
3+
default_app_config = 'rest_framework.authtoken.apps.AuthTokenConfig'

0 commit comments

Comments
 (0)