﻿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
17895	override_settings doesn't send the setting_changed signal when restoring the original value	Aymeric Augustin	nobody	"Django 1.4 introduces the `override_settings` context manager / decorator. When a setting is overridden, it fires the `setting_changed` signal. This signal allows to clean up or reset state that depends on a given setting, when that setting is changed.

However, in the current implementation, the signal isn't fired when the original value of the setting is restored.

I think `setting_changed` would be easier to use if it's fired whenever the value of a setting is ""changed"" in a broad sense, that is ""overridden"" or ""reset"".

While discussing this on IRC, it was suggested to add an extra argument, like `state=""pre"" / ""post""`, to distinguish between the two phases.

I'm marking this ticket as a release blocker because it would significantly change the behavior of `setting_changed`; we must make a decision before 1.4.

It's also a prerequisite for `17882-second-take.patch` on #17882.

Patch w/ tests and docs attached."	Bug	closed	Testing framework	dev	Release blocker	fixed			Accepted	1	0	0	0	0	0
