Skip to content

Commit

Permalink
Update tox config (#599)
Browse files Browse the repository at this point in the history
* Update tox config; update Django and Python versions; change call to mark_safe

* Change call to format_html

* Tox config: add Python 3.10
  • Loading branch information
mbraak authored Dec 4, 2024
1 parent 758c1d2 commit 2884e1a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions example_project/django_mptt_example/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ def code_or_name(self):
@property
def html_code_and_name(self):
if self.code:
return format_html(f"<strong>{self.code}</strong> {self.name}")
return format_html("<strong>{}</strong> {}", self.code, self.name)
else:
return format_html(f"<strong>{self.name}</strong>")
return format_html("<strong>{}</strong>", self.name)
13 changes: 7 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
[tox]
envlist = py311-django32,py311-django40,py311-django41,py311-django42
envlist = py310-django42,py312-django42,py310-django50,py312-django50,py310-django51,py313-django51

[testenv]
changedir = {toxinidir}/example_project
setenv =
PYTHONWARNINGS = default
deps =
-r{toxinidir}/example_project/requirements_test.txt
django32: Django>=3.2,<3.3
django40: Django>=4.0,<4.1
django41: Django>=4.1,<4.2
django42: Django==4.2
django42: Django>=4.2,<4.3
django50: Django>=5.0,<5.1
django51: Django>=5.1,<5.2
commands =
python -Wd manage.py test django_mptt_example
basepython =
py311: python3.11
py310: python3.10
py312: python3.12
py313: python3.13

0 comments on commit 2884e1a

Please sign in to comment.