﻿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
24547	Errors for paths for Model relationships in other apps can be misleading / confusing	andrei kulakov	andrei kulakov	"If a user is creating a relationship to a model in another app, it would be natural to use a path like: ForeignKey('app2.models.Model2'). This is consistent with e.g. urlconf where views are referenced like 'myapp.views.my_view', or generally django imports that use dots to separate elements of a full path.

The error you would get looks like this:
app2.M1.f3: (fields.E300) Field defines a relation with model 'app3.models.M1', which is either not installed, or is abstract.

It might seem like it's not a big deal -- user just has to look at the docs or google for the error.

However, in some cases it may lead to some loss of time, for example I had circular foreign key dependencies between models for testing and thought the error is due to circular references. More generally, django errors can result from seemingly unrelated causes so if a user starts with a firm assumption that a full path needs to be given, the error might lead them to look for all kinds of workarounds to try before coming back to the path format.

It would be easy for django to check the path and, if there are more than one dot in path, and specifically if '.models.' is included in path, a hint should be shown along with the error:

> NOTE: path should be of the form 'myapp.MyModel' and should NOT include the name of module containing models (which is usually 'models')."	Cleanup/optimization	closed	Database layer (models, ORM)	dev	Normal	worksforme	error message, warning		Accepted	0	0	0	0	0	0
