mirror of
https://github.com/django-q2/django-q2.git
synced 2026-10-03 18:18:12 +08:00
Add support for Django 5 (#120)
This commit is contained in:
+1
-1
@@ -60,7 +60,7 @@ def get_func_repr(func):
|
||||
def localtime(value=None) -> datetime:
|
||||
"""Override for timezone.localtime to deal with naive times and local times"""
|
||||
if settings.USE_TZ:
|
||||
if django.VERSION >= (4, 0) and settings.USE_DEPRECATED_PYTZ:
|
||||
if django.VERSION >= (4, 0) and getattr(settings, "USE_DEPRECATED_PYTZ", False):
|
||||
import pytz
|
||||
|
||||
convert_to_tz = pytz.timezone(Conf.TIME_ZONE)
|
||||
|
||||
Reference in New Issue
Block a user