From aa74f174d69220e4033ab6c82fc731eb856713b0 Mon Sep 17 00:00:00 2001 From: Sergio Date: Tue, 12 Dec 2023 13:34:46 +0100 Subject: [PATCH] fix: add support for Django 5 (#159) (#158) Co-authored-by: Sergio Castillo --- .github/workflows/ci.yml | 6 ++++++ django_dramatiq/admin.py | 3 +-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d5f0790..18830e1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,6 +41,12 @@ jobs: - "3.2" # LTS - "4.1" - "4.2" # LTS + - "5.0" + exclude: + - django-version: "5.0" # django 5.0 supports python >=3.10 + python-version: "3.8" + - django-version: "5.0" # django 5.0 supports python >=3.10 + python-version: "3.9" steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 diff --git a/django_dramatiq/admin.py b/django_dramatiq/admin.py index 8af4359..2e56bf3 100644 --- a/django_dramatiq/admin.py +++ b/django_dramatiq/admin.py @@ -1,9 +1,8 @@ import json -from datetime import datetime +from datetime import datetime, timezone from django.conf import settings from django.contrib import admin -from django.utils import timezone from django.utils.safestring import mark_safe from .models import Task