mirror of
https://github.com/Hopiu/django-modeltranslation.git
synced 2026-03-16 22:10:31 +00:00
fix: Fix django version detect during install
This commit is contained in:
parent
79d2e089ef
commit
876f2e7158
1 changed files with 8 additions and 4 deletions
|
|
@ -1,7 +1,11 @@
|
|||
from pathlib import Path
|
||||
from django import VERSION as _django_version
|
||||
|
||||
try:
|
||||
from django import VERSION as _django_version
|
||||
|
||||
if _django_version < (3, 2):
|
||||
default_app_config = 'modeltranslation.apps.ModeltranslationConfig'
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
__version__ = (Path(__file__).parent / "VERSION").open().read().strip()
|
||||
|
||||
if _django_version < (3, 2):
|
||||
default_app_config = 'modeltranslation.apps.ModeltranslationConfig'
|
||||
|
|
|
|||
Loading…
Reference in a new issue