mirror of
https://github.com/SectorLabs/django-localized-fields.git
synced 2025-04-24 11:22:54 +03:00
Make Django tests use USE_TZ = True
to silence Django 5.x deprecation warning
This commit is contained in:
parent
150f671115
commit
84beade9e0
@ -1,3 +1,4 @@
|
|||||||
|
import django
|
||||||
import dj_database_url
|
import dj_database_url
|
||||||
|
|
||||||
DEBUG = True
|
DEBUG = True
|
||||||
@ -51,6 +52,12 @@ MIDDLEWARE = [
|
|||||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
# See: https://github.com/psycopg/psycopg2/issues/1293
|
||||||
|
if django.VERSION >= (3, 1):
|
||||||
|
USE_TZ = True
|
||||||
|
USE_I18N = True
|
||||||
|
TIME_ZONE = 'UTC'
|
||||||
|
|
||||||
# set to a lower number than the default, since
|
# set to a lower number than the default, since
|
||||||
# we want the tests to be fast, default is 100
|
# we want the tests to be fast, default is 100
|
||||||
LOCALIZED_FIELDS_MAX_RETRIES = 3
|
LOCALIZED_FIELDS_MAX_RETRIES = 3
|
||||||
|
Loading…
x
Reference in New Issue
Block a user