1
0
mirror of https://github.com/django/django.git synced 2025-01-15 12:52:31 +00:00

19903 Commits

Author SHA1 Message Date
Tim Graham
fb9551189d [1.8.x] Fixed #24350 -- Freshened up database install topic section.
Backport of 35f0cae19de226d9d7771304fc8dd2619e644998 from master
2015-02-16 14:59:57 -05:00
Tim Graham
77e3f7dd58 [1.8.x] Fixed #24299 -- Added an auth migration to ensure contenttypes is migrated.
Without this migration, the auth signal handlers will fail if migrating
only auth.

Backport of 4538cbf17d4391cda22d76bc6ac69f228f7400f2 from master
2015-02-16 14:55:24 -05:00
Markus Holtermann
906d682ba0 Fixed regression in test introduced in d538e37e1b14603d1d0c94f185f378fc0ed1e53f 2015-02-16 20:38:18 +01:00
Tim Graham
50ec49c087 [1.8.x] Removed a note about old versions of MySQLdb.
Backport of f3bc7c5447a1e4bfa428a7ff32ea3336850c5c2d from master
2015-02-16 14:29:30 -05:00
Sergey Fedoseev
870d900cdc [1.8.x] Refs #24299 -- Made contenttypes migrations signal handler more robust.
Backport of d392c1e150a46aca72e37263c44c034d92a79f79 from master
2015-02-16 13:44:04 -05:00
Markus Holtermann
b7cf99a8c3 [1.8.x] Added tests for get_related_models_recursive
Backport of d538e37e1b14603d1d0c94f185f378fc0ed1e53f from master
2015-02-16 19:38:10 +01:00
Markus Holtermann
a1ba462793 [1.8.x] Fixed #24225, #24264, #24282 -- Rewrote model reloading in migration project state
Instead of naively reloading only directly related models (FK, O2O, M2M
relationship) the project state needs to reload their relations as well
as the model changes as well. Furthermore inheriting models (and super
models) need to be reloaded in order to keep inherited fields in sync.

To prevent endless recursive calls an iterative approach is taken.

Backport of b29f3b51204d53c1c8745966476543d068c173a2 from master
2015-02-16 19:38:02 +01:00
Markus Holtermann
4e9ecfee77 [1.8.x] Refs #24282 -- Added failing test case for assigning models of wrong type to FK
Thanks Jeff Singer for the test case.

Backport of 273bc4b667b964b69b15bc438bcdae3dc6529a2a from master
2015-02-16 19:37:57 +01:00
Markus Holtermann
8ca0eb2af7 [1.8.x] Refs #24264 -- Added failing test case for updating a FK when changing a PK
When the primary key column is altered, foreign keys of referencing
models must be aware of a possible data type change as well and thus
need to be re-rendered.

Thanks Tim Graham for the report.

Backport of cc22b009e05456e3d9cf3c152fe47fa27772be5e from master
2015-02-16 19:37:51 +01:00
Claude Paroz
10ea9ef012 [1.8.x] Refs #24225 -- Added failing test case for removing a previously added field in migrations
When a related field is deleted, the related model must be updated. As
unchanged models are shared in migration states, the related model must
be re-rendered so that the change applies to a new copy of the related
model.

Thanks Henrik Heimbuerger for the report.

Backport of 58d0dd9260156067263ea7a2da2685c3cd88e18a from master
2015-02-16 19:37:40 +01:00
Markus Holtermann
681efedce4 [1.8.x] Explicitly checked for LookupError in contenttypes migration
Backport of 4dd1f4c5eb7a617c1ee512e7a7c732d530e13916 from master
2015-02-16 17:14:33 +01:00
Carl Meyer
e63d9b98e7 [1.8.x] Fixed #23892 -- Clarified compatibility policy for migrations.
Backport of e35c70bef44805d47f6a4ae692be878184c4fe1f from master
2015-02-16 10:12:13 -05:00
Marten Kenbeek
bc2eb6bfef [1.8.x] Fixed #24345 -- Isolated sitemaps_tests from contenttypes_tests; refs #11505
Backport of f668bac9d223408627ca92b2281cf7110039510b from master
2015-02-16 08:43:06 -05:00
Tim Graham
ba9f602708 [1.8.x] Added new "W503 line break before binary operator" warning to flake8 ignore.
Backport of d652906aebd34d9ba943507ce0c3a7be169fab7c from master
2015-02-15 20:09:13 -05:00
Aymeric Augustin
e8950668ca [1.8.x] Deprecated TEMPLATE_DEBUG setting.
Backport of 15b711b from master.
2015-02-15 20:48:48 +01:00
Aymeric Augustin
69c662c981 [1.8.x] Documented how to set up the Jinja2 environment.
This may also help with "Why do context processors not work in Jinja2
templates?" etc.

Backport of 9fbd302 from master
2015-02-15 20:44:40 +01:00
Tim Graham
259259a819 [1.8.x] Isolated auth_tests from contenttypes_tests; refs #11505.
Backport of e0b3926026984dccc86a09c0c4f32e8bec6f3fe1 from master
2015-02-14 22:36:49 -05:00
Michael Angeletti
e13dca859c [1.8.x] Added missing return value to DurationField.prepare_value(); refs #24339.
Backport of 49647bec6e86b8d3d370ea1d8a80423185502c5a from master
2015-02-14 18:39:17 -05:00
Aymeric Augustin
87e9cad4a4 [1.8.x] Fixed #24318 -- Set the transaction isolation level with psycopg >= 2.4.2.
Backport of 76356d96 from master
2015-02-14 18:52:28 +01:00
Claude Paroz
a1fc97c1a7 [1.8.x] Fixed #24144 -- Documented that GEOSGeometry.envelope can return a point
Thanks Manel Clos for the report.
Backport of 1379165b35 from master.
2015-02-14 16:20:58 +01:00
Tim Graham
8657e7caaa [1.8.x] Fixed #24325 -- Documented change in ModelForm.save() foreign key access.
Backport of 0af3822dc362b6253bda1c9699466dd0bbbf6066 from master
2015-02-14 08:09:27 -05:00
Michael Angeletti
2e6d8e51db [1.8.x] Fixed #24339 -- Fixed crash with empty DurationField form field.
Backport of 8a21d250334f56845f255be5534b01d8c6eda314 from master
2015-02-14 07:38:20 -05:00
Aymeric Augustin
0f3eb8260b [1.8.x] Fixed #24338 -- Accepted Template wrapper in {% extends %}.
Explicitly checking for django.template.Template subclasses is
preferrable to duck-typing because both the django.template.Template and
django.template.backends.django.Template have a render() method.

Thanks spectras for the report.

Backport of 47ee7b48 from master
2015-02-14 10:36:44 +01:00
Loic Bistuer
20b621eb3c [1.8.x] Fixed #24289 -- Reversed usage of Field.many_to_one and one_to_many.
Thanks Carl Meyer and Tim Graham for the reviews and to all involved
in the discussion.

Backport of 18c0aaa9123579375294fcc4a8ee7e3530176b88 from master
2015-02-14 02:42:06 +07:00
Andriy Sokolovskiy
136edac897 [1.8.x] Fixed #24320 - Used field.value_to_string() in serialization of foreign key.
This fixes serialization of a ForeignKey to a UUIDField as the
test indicates.

Backport of 5c995dcfc251b55284e1ef16545acd2acad6be04 from master
2015-02-13 12:45:35 -05:00
Joe Simpson
8277f5d7d0 [1.8.x] Added each_context() and a template tip to custom admin view docs.
Backport of 648e516b8d5694c01a225fe27429f0bf7776fb43 from master
2015-02-13 10:38:29 -05:00
Tim Graham
2347f3267f [1.8.x] Fixed #24315 -- Fixed auth.views.password_reset_confirm() with a UUID user.
Backport of 002425fe39f62faafaa32e400f7531809181a1a0 from master
2015-02-13 09:57:44 -05:00
Tim Graham
8fc4840289 [1.8.x] Fixed #24334 -- Allowed admin password reset to work with non-digit custom user model primary key.
Thanks Loic for help and Simon for review.

Backport of fdf20093e0f8cd064673aa1597c20727ed4dd2a0 from master
2015-02-13 09:50:55 -05:00
Markus Holtermann
bd80fa6b0f [1.8.x] Fixed #24184 -- Prevented automatic soft-apply of migrations
Previously Django only checked for the table name in CreateModel
operations in initial migrations and faked the migration automatically.
This led to various errors and unexpected behavior. The newly introduced
--fake-initial flag to the migrate command must be passed to get the
same behavior again. With this change Django will bail out in with a
"duplicate relation / table" error instead.

Thanks Carl Meyer and Tim Graham for the documentation update, report
and review.

Backport of f287bec5833d75750fa6368bc2802741b7924533 from master
2015-02-13 15:21:10 +01:00
Markus Holtermann
4ba7d73f94 [1.8.x] Removed explicit pointers to migration modules for contrib apps in runtest
Thanks Tim Graham for the patch

Backport of b4e1090ab28c0e731157a61a91a6875bad392307 from master
2015-02-13 15:21:03 +01:00
Markus Holtermann
45d93baf51 [1.8.x] Refs #22962 -- Made test case use non-conflicting table names
Backport of b06935a486e633e9732bce2bc5f796eb437b2531 from master
2015-02-13 14:39:50 +01:00
Tim Graham
4c948c7c9d [1.8.x] Fixed #24332 -- Fixed contrib.sites create_default_site() when 'default' DATABASES is empty.
Backport of e8cf4f8abec87b9da6ed8e5c8cf833af9b27f4dd from master
2015-02-13 07:02:37 -05:00
Josh Smeaton
47b23ca2ee [1.8.x] Refs #14030 -- Added tests for Value aggregates
Backport of bd4afef98490198e325654952d38a5735ee7e358 from master
2015-02-13 11:24:25 +11:00
Josh Smeaton
1784c326b1 [1.8.x] Fixed #24319 -- Added validation for UUID model field
Backport of de0241eb985c6dec978beda119fee353ef3e9604 from master
2015-02-13 10:01:06 +11:00
Tim Graham
03f4e2d909 [1.8.x] Fixed #24333 -- Fixed admin history view crash with non-integer slug.
Backport of d64baaef3b95abe9ae5d07317c9bf4df02cb8592 from master
2015-02-12 14:20:17 -05:00
Tim Graham
6476fa73d3 [1.8.x] Forwardported item in 1.7.5 release notes.
Backport of a93c5fb2bfbadd4628a2a5d6b6aecbd64bd527cb from master
2015-02-12 14:06:21 -05:00
Thomas Güttler
6b8c8d7e18 [1.8.x] Clarified timeout=0 in cache docs.
Backport of e519ee1d352e0e36fcb8edc9d33ec2845f663d3a from master
2015-02-12 10:32:56 -05:00
Tim Graham
8d1816db87 [1.8.x] Added a test for UUIDField serialization; refs #24320.
Backport of d7509c52466aeffb13ccd8a86475e74fdb0e6292 from master
2015-02-12 10:17:31 -05:00
Tim Graham
7b5aa20a28 [1.8.x] Fixed #17716 -- Prevented include('...', app_name='...') without a namespace.
Backport of 27eeb64a96ec6d3a05714ab6319b500a935706fb from master
2015-02-12 08:19:10 -05:00
Nik Nyby
0ab8ec4312 [1.8.x] Subclassed template.Node instead of Node for consistency.
Backport of 34ccb3cc038ac30b13a7243a3dbd9366c1119746 from master
2015-02-12 08:05:04 -05:00
Tim Graham
596564e808 [1.8.x] Fixed #24161 -- Stored the user primary key as a serialized value in the session.
This allows using a UUIDField primary key along with the JSON session
serializer.

Thanks to Trac alias jamesbeith for the report and Simon Charette
for the initial patch.

Backport of 0f7f5bc9e7a94ab91c2b3db29ef7cf000eff593f from master
2015-02-12 07:40:14 -05:00
Lukas Klein
1904022f91 [1.8.x] Fixed #24321 -- Improved utils.http.same_origin compliance with RFC6454
Backport of 93b3ef9b2e from master.
2015-02-12 09:01:59 +01:00
Josh Smeaton
a6ea62aeaf [1.8.x] Refs #14030 -- Improved expression support for python values
Backport of e2d6e14662d780383e18066a3182155fb5b7747b from master
2015-02-12 08:53:03 +11:00
Collin Anderson
343c087533 [1.8.x] Refs #14497 -- Handled empty readonly admin FileFields
Backport of 07cfe1bd822f4108b5029aef1615a17000d0b0dc from master
2015-02-11 13:01:25 -05:00
Tim Graham
e06971340d [1.8.x] Moved contrib.webdesign tests out of contrib.
Backport of 8ec306a3a90aa2ec0baa4c9d8df68f0d49947a2c from master
2015-02-11 12:35:32 -05:00
Tim Graham
411028df53 [1.8.x] Updated docs and runtests.py for removal of tests from contrib.
Backport of 7cf3a5786bc76374e743fbc0c1a1c8470a61f6c0 from master
2015-02-11 12:05:55 -05:00
Tim Graham
69c89aeccf [1.8.x] Moved contrib.gis tests out of contrib.
Backport of ad0be620aece4dde2f94383426c284f4afef9fbc from master
2015-02-11 12:05:29 -05:00
Tim Graham
2482c9dd24 [1.8.x] Moved non-documented auth test models to the new test location.
Backport of 5ab327a3894c26f57baabe14084bcce2a71b8af8 from master
2015-02-11 12:03:03 -05:00
Tim Graham
e55d888b66 [1.8.x] Moved contrib.auth tests out of contrib.
Backport of 2d7aca3da0a46c09e9c70ebdb56ed340691a999f from master
2015-02-11 12:02:35 -05:00
Tim Graham
44df17d53c [1.8.x] Moved contrib.humanize tests out of contrib.
Backport of 8192a164defa24d75672e6b10cec650489b8c748 from master
2015-02-11 11:55:53 -05:00