﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
21414	Remove django.db.models.related.RelatedObject	Anssi Kääriäinen	Tim Graham	"Currently related fields have two similar attributes, self.rel and self.related. The first is ForeignObjectRel subclass, the second is RelatedObject. Both of these do almost the same thing, and it doesn't seem necessary to have both rel and related. It is confusing to try to remember which one does what.

In the proposed patch at https://github.com/akaariai/django/tree/related_rel_removal the RelatedObject usage is removed. The idea is to make ForeignObjectRel to work exactly like RelatedObject worked and provide the same instance from field.rel and field.related.

I've opted for deprecation path where RelatedObject can still be used, and so can field.related, too. The field.related attribute is actually ForeignObjectRel, but by usage of `__instancecheck__` isinstance(field.related, RelatedObject) answers yes. This should make this change easy for 3rd party apps."	Cleanup/optimization	closed	Database layer (models, ORM)	dev	Normal	fixed		loic@…	Accepted	1	0	0	0	0	0
