Skip to content
This repository has been archived by the owner on Apr 16, 2020. It is now read-only.

Support for Django 3.0 #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion django_postgres_extensions/models/expressions.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from django.db.models.expressions import F as BaseF, Value as BaseValue, Func, Expression
from django.utils import six
import six
from django.contrib.postgres.fields.array import IndexTransform
from django.utils.functional import cached_property
from django.db.models.lookups import Transform
Expand Down
4 changes: 2 additions & 2 deletions django_postgres_extensions/models/fields/related.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from django.db import models
from django.db.models.fields.related import RECURSIVE_RELATIONSHIP_CONSTANT, lazy_related_operation
from django.forms.models import ModelMultipleChoiceField
from django.utils import six
import six
from django.utils.encoding import force_text
from .related_lookups import RelatedArrayContains, RelatedArrayExact, RelatedArrayContainedBy, RelatedContainsItem, \
RelatedArrayOverlap, RelatedAnyGreaterThan, RelatedAnyLessThanOrEqual, RelatedAnyLessThan, RelatedAnyGreaterThanOrEqual
Expand Down Expand Up @@ -353,4 +353,4 @@ def get_lookup(self, lookup_name):
elif lookup_name == 'lte':
return RelatedAnyLessThanOrEqual
else:
raise TypeError('Related Array got invalid lookup: %s' % lookup_name)
raise TypeError('Related Array got invalid lookup: %s' % lookup_name)
4 changes: 2 additions & 2 deletions django_postgres_extensions/models/functions.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from django.db.models.expressions import Func, Expression
from django.db.models.sql.constants import GET_ITERATOR_CHUNK_SIZE
from django.utils import six
import six
from .expressions import F, Value as V

class SimpleFunc(Func):
Expand Down Expand Up @@ -167,4 +167,4 @@ class JSONStripNulls(SimpleFunc):
function = 'JSON_STRIP_NULLS'

class JSONTypeOf(SimpleFunc):
function = 'JSON_TYPE_OF'
function = 'JSON_TYPE_OF'
4 changes: 2 additions & 2 deletions django_postgres_extensions/models/sql/subqueries.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from django.db.models.sql.subqueries import UpdateQuery as BaseUpdateQuery
from django.utils import six
import six
from django.core.exceptions import FieldError

class UpdateQuery(BaseUpdateQuery):
Expand Down Expand Up @@ -31,4 +31,4 @@ def add_update_values(self, values):
self.add_related_update(model, field, val)
continue
values_seq.append((field, model, val))
return self.add_update_fields(values_seq)
return self.add_update_fields(values_seq)