﻿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
25616	Add note regarding missing dependencies on LookupError for migrations	Mike C. Fletcher	Niclas Olofsson	"If you have a product package that includes migrations which depend on a plugin package, and you forget to include a dependency on the migration, you wind up with a confusing error message (raised from Apps.get_app_config):
{{{
 LookupError(""No installed app with label '%s'""%(label,))
}}}
where label is the name of the ""missing"" app. Which then leads the user to trying to figure out why the app, which is in settings.py is not showing up.

It would be helpful, in `django.db.migrations.state` if we were to annotate the LookupError with the common issue the user is likely seeing, something like (on StateApps):
{{{
    def get_app_config(self, app_label):
        try:
            return super(StateApps, self).get_app_config(app_label)
        except LookupError as err:
            err.args += ('Possibly missing dependency on a migration?', )
            raise
}}}
I'm not attached to the particular implementation or wording, just suggesting that the error message should be cleaner in the migrations-can't-find-app case, which is different than the general ""can't find an app of that name"" case."	Cleanup/optimization	closed	Migrations	dev	Normal	needsinfo		0coming.soon@…	Accepted	1	0	0	1	0	0
