Skip to content

Commit bf1d190

Browse files
committed
#7 - fixed default_app_config issue in django >= 4.0
1 parent 5898110 commit bf1d190

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ninja_extra/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
__version__ = "0.14.2"
44

5+
import django
6+
57
from ninja_extra.controllers import (
68
ControllerBase,
79
api_controller,
@@ -17,7 +19,9 @@
1719
from ninja_extra.main import NinjaExtraAPI
1820
from ninja_extra.router import Router
1921

20-
default_app_config = "ninja_extra.apps.NinjaExtraConfig"
22+
if django.VERSION < (3, 2): # pragma: no cover
23+
default_app_config = "ninja_extra.apps.NinjaExtraConfig"
24+
2125

2226
__all__ = [
2327
"ControllerBase",

0 commit comments

Comments
 (0)