mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Refs #33308 -- Moved psycopg2 imports to the psycopg_any module.
This commit is contained in:
committed by
Mariusz Felisiak
parent
c5ed884eab
commit
2ebfbd894e
@@ -8,14 +8,18 @@ from django.test import TestCase
|
||||
from django.test.utils import modify_settings
|
||||
|
||||
try:
|
||||
from psycopg2.extras import DateRange, DateTimeRange, DateTimeTZRange, NumericRange
|
||||
|
||||
from django.contrib.postgres.fields import (
|
||||
DateRangeField,
|
||||
DateTimeRangeField,
|
||||
DecimalRangeField,
|
||||
IntegerRangeField,
|
||||
)
|
||||
from django.db.backends.postgresql.psycopg_any import (
|
||||
DateRange,
|
||||
DateTimeRange,
|
||||
DateTimeTZRange,
|
||||
NumericRange,
|
||||
)
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user