Commit Graph

4 Commits

Author SHA1 Message Date
Marten Kenbeek febcbbf89d [1.8.x] Fixed #24488 -- Made create_default_site() use default pk of 1.
Fixed create_default_site() to use a default value in case
settings.SITE_ID isn't set; refs #23945.

Backport of 818182b514 from master
2015-03-16 13:31:22 -04:00
Loic Bistuer 3a6c37fce4 [1.8.x] Fixed #24351, #24346 -- Changed the signature of allow_migrate().
The new signature enables better support for routing RunPython and
RunSQL operations, especially w.r.t. reusable and third-party apps.

This commit also takes advantage of the deprecation cycle for the old
signature to remove the backward incompatibility introduced in #22583;
RunPython and RunSQL won't call allow_migrate() when when the router
has the old signature.

Thanks Aymeric Augustin and Tim Graham for helping shape up the patch.

Refs 22583.

Conflicts:
	django/db/utils.py

Backport of bed504d70b from master
2015-02-20 21:55:50 +07:00
Tim Graham 4c948c7c9d [1.8.x] Fixed #24332 -- Fixed contrib.sites create_default_site() when 'default' DATABASES is empty.
Backport of e8cf4f8abe from master
2015-02-13 07:02:37 -05:00
Tim Graham 0520cfe94a [1.8.x] Moved contrib.sites tests out of contrib.
Backport of d8341bf024 from master
2015-02-11 11:50:23 -05:00