summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Charette <charette.s@gmail.com>2013-04-01 17:30:43 -0400
committerSimon Charette <charette.s@gmail.com>2013-04-01 17:32:09 -0400
commit8d05e6c0c7fe35df86799fa2fdcdb6499a4f6312 (patch)
tree9840c81b3fb0ea9873d3dcd784e0929f1bafeb8a
parentedc782b7b50b379c2b95cf8ba13ffae541fe58ed (diff)
Fixed deprecation warnings introduced by 97774429aeb54df4c09895c07cd1b09e70201f7d.
-rw-r--r--django/db/models/fields/related.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/django/db/models/fields/related.py b/django/db/models/fields/related.py
index b575583ebc..677a4707a0 100644
--- a/django/db/models/fields/related.py
+++ b/django/db/models/fields/related.py
@@ -171,7 +171,7 @@ class SingleRelatedObjectDescriptor(six.with_metaclass(RenameRelatedObjectDescri
instance_attr = lambda obj: obj._get_pk_val()
instances_dict = dict((instance_attr(inst), inst) for inst in instances)
query = {'%s__in' % self.related.field.name: instances}
- qs = self.get_query_set(instance=instances[0]).filter(**query)
+ qs = self.get_queryset(instance=instances[0]).filter(**query)
# Since we're going to assign directly in the cache,
# we must manage the reverse relation cache manually.
rel_obj_cache_name = self.related.field.get_cache_name()
@@ -271,12 +271,12 @@ class ReverseSingleRelatedObjectDescriptor(six.with_metaclass(RenameRelatedObjec
else:
return QuerySet(self.field.rel.to).using(db)
- def get_prefetch_query_set(self, instances):
+ def get_prefetch_queryset(self, instances):
rel_obj_attr = self.field.get_foreign_related_value
instance_attr = self.field.get_local_related_value
instances_dict = dict((instance_attr(inst), inst) for inst in instances)
query = {'%s__in' % self.field.related_query_name(): instances}
- qs = self.get_query_set(instance=instances[0]).filter(**query)
+ qs = self.get_queryset(instance=instances[0]).filter(**query)
# Since we're going to assign directly in the cache,
# we must manage the reverse relation cache manually.
if not self.field.rel.multiple:
@@ -300,7 +300,7 @@ class ReverseSingleRelatedObjectDescriptor(six.with_metaclass(RenameRelatedObjec
(rh_field.attname, getattr(instance, lh_field.attname))
for lh_field, rh_field in self.field.related_fields)
params.update(self.field.get_extra_descriptor_filter(instance))
- qs = self.get_query_set(instance=instance)
+ qs = self.get_queryset(instance=instance)
# Assuming the database enforces foreign keys, this won't fail.
rel_obj = qs.get(**params)
if not self.field.rel.multiple:
@@ -429,8 +429,8 @@ class ForeignRelatedObjectsDescriptor(object):
instances_dict = dict((instance_attr(inst), inst) for inst in instances)
db = self._db or router.db_for_read(self.model, instance=instances[0])
query = {'%s__in' % rel_field.name: instances}
- qs = super(RelatedManager, self).get_query_set().using(db).filter(**query)
- # Since we just bypassed this class' get_query_set(), we must manage
+ qs = super(RelatedManager, self).get_queryset().using(db).filter(**query)
+ # Since we just bypassed this class' get_queryset(), we must manage
# the reverse relation manually.
for rel_obj in qs:
instance = instances_dict[rel_obj_attr(rel_obj)]
@@ -545,7 +545,7 @@ def create_many_related_manager(superclass, rel):
instance = instances[0]
db = self._db or router.db_for_read(instance.__class__, instance=instance)
query = {'%s__in' % self.query_field_name: instances}
- qs = super(ManyRelatedManager, self).get_query_set().using(db)._next_is_sticky().filter(**query)
+ qs = super(ManyRelatedManager, self).get_queryset().using(db)._next_is_sticky().filter(**query)
# M2M: need to annotate the query in order to get the primary model
# that the secondary model was actually related to. We know that