Skip to content

Commit 5297f00

Browse files
authored
Fix RemovedInDjango41Warning (#370)
RemovedInDjango41Warning: 'post_office' defines default_app_config = 'post_office.apps.PostOfficeConfig'. Django now detects this configuration automatically. You can remove default_app_config.
1 parent a20c3e7 commit 5297f00

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

post_office/__init__.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import django
12
from ast import literal_eval
23
from os.path import dirname, join
34

@@ -6,4 +7,5 @@
67

78
from .backends import EmailBackend
89

9-
default_app_config = 'post_office.apps.PostOfficeConfig'
10+
if django.VERSION < (3, 2): # pragma: no cover
11+
default_app_config = 'post_office.apps.PostOfficeConfig'

0 commit comments

Comments
 (0)