-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Delete deprecated argument * Adds conditional assignment of function from_db_value depending on django version * Cleaner solution * Add django version code and import * Change util to relative import --------- Co-authored-by: Juan Alfaro <[email protected]>
- Loading branch information
Showing
2 changed files
with
25 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from platform import python_version | ||
from django import get_version | ||
|
||
from distutils.version import LooseVersion | ||
|
||
|
||
DJANGO_VERSION = get_version() | ||
PYTHON_VERSION = python_version() | ||
|
||
# These means "less than or equal to DJANGO_FOO_BAR" | ||
DJANGO_2_2 = LooseVersion(DJANGO_VERSION) < LooseVersion('3.0') |