diff options
author | Michal Petrucha <michal.petrucha@koniiiik.org> | 2016-03-20 18:10:55 +0100 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2016-04-13 10:10:53 -0400 |
commit | c339a5a6f72690cd90d5a653dc108fbb60274a20 (patch) | |
tree | 41b1deef69d5c35b2fc78c67a31d1e647774ae76 /tests/foreign_object | |
parent | 47fbbc33de805c803c39483344854caa2890c32c (diff) | |
download | django-c339a5a6f72690cd90d5a653dc108fbb60274a20.tar.gz |
Refs #16508 -- Renamed the current "virtual" fields to "private".
The only reason why GenericForeignKey and GenericRelation are stored
separately inside _meta is that they need to be cloned for every model
subclass, but that's not true for any other virtual field. Actually,
it's only true for GenericRelation.
Diffstat (limited to 'tests/foreign_object')
-rw-r--r-- | tests/foreign_object/models/empty_join.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/foreign_object/models/empty_join.py b/tests/foreign_object/models/empty_join.py index b8b05ea1c2..61ac5e35a4 100644 --- a/tests/foreign_object/models/empty_join.py +++ b/tests/foreign_object/models/empty_join.py @@ -64,8 +64,8 @@ class StartsWithRelation(models.ForeignObject): from_opts = self.remote_field.model._meta return [PathInfo(from_opts, to_opts, (to_opts.pk,), self.remote_field, False, False)] - def contribute_to_class(self, cls, name, virtual_only=False): - super(StartsWithRelation, self).contribute_to_class(cls, name, virtual_only) + def contribute_to_class(self, cls, name, private_only=False): + super(StartsWithRelation, self).contribute_to_class(cls, name, private_only) setattr(cls, self.name, ReverseManyToOneDescriptor(self)) |