summaryrefslogtreecommitdiff
path: root/django/db/backends/postgresql_psycopg2
diff options
context:
space:
mode:
authorAndrew Godwin <andrew@aeracode.org>2013-06-28 17:32:57 +0100
committerAndrew Godwin <andrew@aeracode.org>2013-06-28 17:32:57 +0100
commit7a47ba6f6aeca36b8b092dbafd36abb342d34d4b (patch)
treee959922f7d4d08057225459e31697f410e26df26 /django/db/backends/postgresql_psycopg2
parente2d7e83256234251a81ad3388428f6579795a672 (diff)
parent48dd1e63bbb93479666208535a56f8c7c4aeab3a (diff)
downloaddjango-7a47ba6f6aeca36b8b092dbafd36abb342d34d4b.tar.gz
Merge remote-tracking branch 'core/master' into schema-alteration
Conflicts: django/db/backends/__init__.py django/db/models/fields/related.py tests/field_deconstruction/tests.py
Diffstat (limited to 'django/db/backends/postgresql_psycopg2')
-rw-r--r--django/db/backends/postgresql_psycopg2/base.py2
-rw-r--r--django/db/backends/postgresql_psycopg2/creation.py2
-rw-r--r--django/db/backends/postgresql_psycopg2/operations.py2
3 files changed, 1 insertions, 5 deletions
diff --git a/django/db/backends/postgresql_psycopg2/base.py b/django/db/backends/postgresql_psycopg2/base.py
index de86758653..bf75459b4a 100644
--- a/django/db/backends/postgresql_psycopg2/base.py
+++ b/django/db/backends/postgresql_psycopg2/base.py
@@ -6,7 +6,6 @@ Requires psycopg 2: http://initd.org/projects/psycopg2
import logging
import sys
-from django.db import utils
from django.db.backends import *
from django.db.backends.postgresql_psycopg2.operations import DatabaseOperations
from django.db.backends.postgresql_psycopg2.client import DatabaseClient
@@ -17,7 +16,6 @@ from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor
from django.utils.encoding import force_str
from django.utils.functional import cached_property
from django.utils.safestring import SafeText, SafeBytes
-from django.utils import six
from django.utils.timezone import utc
try:
diff --git a/django/db/backends/postgresql_psycopg2/creation.py b/django/db/backends/postgresql_psycopg2/creation.py
index 819dd7a29e..1bfda6354d 100644
--- a/django/db/backends/postgresql_psycopg2/creation.py
+++ b/django/db/backends/postgresql_psycopg2/creation.py
@@ -1,5 +1,3 @@
-import psycopg2.extensions
-
from django.db.backends.creation import BaseDatabaseCreation
from django.db.backends.util import truncate_name
diff --git a/django/db/backends/postgresql_psycopg2/operations.py b/django/db/backends/postgresql_psycopg2/operations.py
index f96757da8b..c5aab84693 100644
--- a/django/db/backends/postgresql_psycopg2/operations.py
+++ b/django/db/backends/postgresql_psycopg2/operations.py
@@ -69,7 +69,7 @@ class DatabaseOperations(BaseDatabaseOperations):
# Cast text lookups to text to allow things like filter(x__contains=4)
if lookup_type in ('iexact', 'contains', 'icontains', 'startswith',
- 'istartswith', 'endswith', 'iendswith'):
+ 'istartswith', 'endswith', 'iendswith', 'regex', 'iregex'):
lookup = "%s::text"
# Use UPPER(x) for case-insensitive lookups; it's faster.