Skip to content

Commit efcc981

Browse files
martin-martyrobinzelders
authored andcommitted
Trying with django <3.2,>=2.0
1 parent e8584dc commit efcc981

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

src/relativedeltafield/fields.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
from django.core.exceptions import ValidationError
22
from django.db import models
3-
from django.utils.translation import gettext_lazy as _
4-
53
from relativedeltafield.utils import (format_relativedelta,
64
parse_relativedelta,
75
relativedelta_as_csv)
86

7+
try:
8+
from django.utils.translation import gettext_lazy as _
9+
except ImportError:
10+
from django.utils.translation import ugettext as _
11+
912

1013
class RelativeDeltaDescriptor:
1114
def __init__(self, field) -> None:

tox.ini

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = d{32,40,41}-py{39,310}-{pg,sqlite,mysql}
2+
envlist = d{20,21,22,30,31,32,40,41}-py{39,310}-{pg,sqlite,mysql}
33

44
[gh-actions]
55
python =
@@ -68,8 +68,13 @@ deps =
6868
psycopg2-binary
6969
mysql: mysqlclient
7070
docs: -rdocs/requirements.pip
71-
d32: django==3.2.*
72-
d40: django==4.0.*
71+
d20: django>=2.0,<2.1
72+
d21: django>=2.1,<2.2
73+
d22: django>=2.2,<2.3
74+
d30: django=>3.0,<3.1
75+
d31: django=>3.1,<3.2*
76+
d32: django=>3.2,<4
77+
d40: django=>4.0,<4.1
7378
d41: django==4.1.*
7479

7580
commands =

0 commit comments

Comments
 (0)