Skip to content

Commit

Permalink
Use a simpler logic to get django's version
Browse files Browse the repository at this point in the history
  • Loading branch information
vtemian committed May 8, 2020
1 parent 69a77ec commit f117134
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions fernet_fields/utils.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import django
from django import VERSION as DJANGO_VERSION


DJANGO_VERSION = django.get_version().split('.')
if DJANGO_VERSION[0] < "3":
if DJANGO_VERSION[0] < 3:
from django.utils.encoding import force_text
else:
from django.utils.encoding import force_str as force_text

0 comments on commit f117134

Please sign in to comment.