﻿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
36345	manage.py shouldn't do template rendering in migration-related commands	Christophe Pettus		"It appears that `manage.py makemigrations` and `manage.py migrate` do some kind of template rendering. This can cause problem in a particular situation:

1. The template rendering path make calls to the ORM (for example, setting a Jinja2 global variable), and,
2. That call to the ORM uses one of the models being migrated, and,
3. The migration is incompatible between the current state on disk and the model class.

The result is that it attempts to do a query with the current state of the model class, which fails, because the migration has not been applied yet (stack trace on 5.2 attached)."	Bug	closed	Migrations	5.2	Normal	invalid			Unreviewed	0	0	0	0	0	0
