Skip to content

Commit

Permalink
Fix RemovedInDjango41Warning (#370)
Browse files Browse the repository at this point in the history
RemovedInDjango41Warning: 'post_office' defines default_app_config = 'post_office.apps.PostOfficeConfig'. Django now detects this configuration automatically. You can remove default_app_config.
  • Loading branch information
Mogost authored Aug 22, 2021
1 parent a20c3e7 commit 5297f00
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion post_office/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import django
from ast import literal_eval
from os.path import dirname, join

Expand All @@ -6,4 +7,5 @@

from .backends import EmailBackend

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

0 comments on commit 5297f00

Please sign in to comment.