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

20019 Commits

Author SHA1 Message Date
Markus Holtermann
c9addfd4bf [1.8.x] Fixed small regression caused by e3702dc3f2af9e8cc6c1155b248f458899be334e
Since 1.7 models need to declare an explicit app_label if they are not
in an application in INSTALLED_APPS or were imported before their
application was loaded.

Backport of 235124d3eaf6cc7ab9f97f1d1467d1caf18e1016 from master
2015-02-06 00:50:42 +01:00
Markus Holtermann
e3702dc3f2 [1.8.x] Cleaned up schema tests
Thanks Tim Graham for the review.

Backport of 0204714b0bdf10d7558ee106de9a718407f3ec5a from master
2015-02-05 20:15:18 +01:00
Aymeric Augustin
aed1b1f6e5 [1.8.x] Fixed #24265 -- Preserved template backend loading exceptions.
If importing or initializing a template backend fails, attempting to
access this template backend again must raise the same exception.

Backport of 44ad6915 from master
2015-02-05 20:09:22 +01:00
Aymeric Augustin
67787db22a [1.8.x] Caught all exceptions raised by Engine.get_default().
In addition to ImproperlyConfigured, Engine.get_default() may also raise
ImportError or other exceptions. It's better to catch all exceptions in
places where the default engine isn't strictly required.

Backport of 27f9ff45 from master
2015-02-05 20:09:10 +01:00
Aymeric Augustin
5fbec369aa [1.8.x] Fixed #24273 -- Allowed copying RequestContext more than once.
Thanks Collin Anderson for the report.

Backport of 31d3a355 from master
2015-02-05 14:07:18 +01:00
Tom Christie
f5749252ea [1.8.x] Improved nested ArrayField example
Backport of 737b184d914d5cc4a6ed8fe2a1d66ec1b7369f46 from master
2015-02-05 11:35:23 +01:00
Matthew Somerville
2a55301f9f [1.8.x] Fixed #24242 -- Improved efficiency of utils.text.compress_sequence()
The function no longer flushes zfile after each write as doing so can
lead to the gzipped streamed content being larger than the original
content; each flush adds a 5/6 byte type 0 block. Removing this means
buf.read() may return nothing, so only yield if that has some data.
Testing shows without the flush() the buffer is being flushed every 17k
or so and compresses the same as if it had been done as a whole string.

Backport of caa3562d5bec1196502352a715a539bdb0f73c2d from master
2015-02-04 15:17:22 -05:00
mlavin
d585ade0df [1.8.x] Fixed #24197 -- Added clearing of staticfiles caches on settings changes during tests
Cleared caching in staticfiles_storage and get_finder when
relevant settings are changed.

Backport of 2730dad0d7c425f33f1ecc6cec01fdbf1cdd8376 from master
2015-02-04 10:54:33 -05:00
Riccardo Magliocchetti
4957b8a406 [1.8.x] Fixed #14497 -- Improved admin widget for "read only" FileFields
Based on patch by Adam J Forster, Paul Collins, and Julien.

Backport of 2be621e44c1b5b68c895383f3e20b1f17ddb447a from master
2015-02-04 09:05:41 -05:00
Josh Schneier
16e3910e9c [1.8.x] Fixed typos of "select_related" in docs and tests.
Backport of 7d363ed43247a80d2b764723e1bf6e0e6da4e82f from master
2015-02-04 07:32:34 -05:00
Aron Podrigal
fc49e73648 [1.8.x] Fixed #15321 -- Honored ancestors unique checks.
Thanks to Tim for the review.

Backport of 79f27f2b61aeac763ae048416ef8a97c2b639ae8 from master
2015-02-03 18:58:48 -05:00
Tim Graham
3e24ab6f4c [1.8.x] Refactored tests that rely on an ImportError for Python 3.5 compatibility
A change in Python test discovery [1] causes the old packages that raised
an error to be discovered; now we use a common directory that's
ignored during discovery. Refs #23763.

[1] http://bugs.python.org/issue7559

Backport of c0cc8f69e7abfa8578729031f97ae4b96c5cdafe from master
2015-02-03 18:31:17 -05:00
Simon Charette
cbcf92e95f [1.8.x] Fixed #24266 -- Changed get_parent_list to return a list ordered by MRO.
Thanks to Aron Podrigal for the initial patch and Tim for the review.

Backport of 65e005f8cd9c656e558e53e6c8b890cd0fcc9e74 from master
2015-02-03 16:41:51 -05:00
Tim Graham
dd83bab931 [1.8.x] Demoted "Installing a distribution-specific package" in install notes.
Backport of 281fc03474ac18c8281ed4cf289128c87bda2030 from master
2015-02-03 16:38:05 -05:00
Tim Graham
92d5bedc56 [1.8.x] Reverted "Fixed #24146 -- Fixed a missing fields regression in admin checks."
This reverts commit e8171daf0cd7f0e070395cb4c850c17fea32f11d.

A new solution is forthcoming.

Backport of 0e489c19f1554ecfd9825daacfbac73be8ce723e from master
2015-02-03 15:24:24 -05:00
Tim Graham
ff39de1e1e [1.8.x] Added a "Writing migrations" how-to.
Backport of 570912a97d5051fa3aeacd9d16c3be9afcf92198 from master
2015-02-03 13:46:56 -05:00
minusf
b35c226154 [1.8.x] Fixed typos in docs/ref/forms/validation.txt.
Backport of 66f5aa9fa5d53ddd7fbdb7ddac39c429f0c1b4fd from master
2015-02-03 12:27:16 -05:00
Claude Paroz
ea3e40c278 [1.8.x] Fixed #24252 -- Forced lazy __str__ to utf-8 on Python 2
Thanks Stanislas Guerra for the report and Tomas Ehrlich for
the review.
Backport of cd0ceaa102 from master.
2015-02-03 18:26:08 +01:00
Matthew Somerville
d88c24f436 [1.8.x] Fixed #24240 -- Allowed GZipping a Unicode StreamingHttpResponse
make_bytes() assumed that if the Content-Encoding header is set, then
everything had already been dealt with bytes-wise, but in a streaming
situation this was not necessarily the case.

make_bytes() is only called when necessary when working with a
StreamingHttpResponse iterable, but by that point the middleware has
added the Content-Encoding header and thus make_bytes() tried to call
bytes(value) (and dies). If it had been a normal HttpResponse,
make_bytes() would have been called when the content was set, well
before the middleware set the Content-Encoding header.

This commit removes the special casing when Content-Encoding is set,
allowing unicode strings to be encoded during the iteration before they
are e.g. gzipped. This behaviour was added a long time ago for #4969 and
it doesn't appear to be necessary any more, as everything is correctly
made into bytes at the appropriate places.

Two new tests, to show that supplying non-ASCII characters to a
StreamingHttpResponse works fine normally, and when passed through the
GZip middleware (the latter dies without the change to make_bytes()).
Removes the test with a nonsense Content-Encoding and Unicode input - if
this were to happen, it can still be encoded as bytes fine.

Backport of 250aa7c39b from master.
2015-02-03 18:19:06 +01:00
Anssi Kääriäinen
43b0131fb5 [1.8.x] Fixed #23617 -- Added get_pk_value_on_save()
The method is mainly intended for use with UUIDField. For UUIDField we
want to call the field's default even when primary key value is
explicitly set to None to match the behavior of AutoField.

Thanks to Marc Tamlyn and Tim Graham for review.

Backport of 8adc59038cdc6ce4f9170e4de2d716d940e136b3 from master
2015-02-03 09:25:55 -05:00
Tim Graham
9ffe013caa [1.8.x] Fixed #24263 -- Prevented extra queries on BaseDateDetailView with a custom queryset.
Thanks jekka-ua for the report and patch.

Backport of 118b11221f7f632b4d0e6e976c87f563746ec211 from master
2015-02-03 09:13:10 -05:00
Tim Graham
5fdd74f4be [1.8.x] Fixed broken links in class based views flattend index; refs #24250.
Backport of 9a391fbd6102176d576aa96ed3aeee9e9661b455 from master
2015-02-03 09:12:08 -05:00
Tim Graham
6454716264 [1.8.x] Fixed #24250 -- Corrected mistakes in FormMixin docs.
Backport of 5d193d042a3cc49033f0e8b5125913650d779496 from master
2015-02-03 08:42:49 -05:00
Tim Graham
c65c8f5696 [1.8.x] Skipped tests from refs #24168 on Python 3.2. 2015-02-03 08:21:06 -05:00
Aymeric Augustin
f87457a460 [1.8.x] Fixed #24168 -- Allowed selecting a template engine in a few APIs.
Specifically in rendering shortcuts, template responses, and class-based
views that return template responses.

Also added a test for render_to_response(status=...) which was missing
from fdbfc980.

Thanks Tim and Carl for the review.

Backport of 2133f31 from master.

Conflicts:
	docs/topics/http/shortcuts.txt
	tests/generic_views/test_base.py
2015-02-03 08:32:14 +01:00
Tim Graham
3af1e7860e [1.8.x] Removed contrib.auth.forms.mask_password()
This function is unused since dce820ff70f00e974afd3e6e310aa825bc55319f
after being introduced in 718a5ba1a1a77374c26b134ded46dab13776d1a1

Backport of a53541852d5601232899e54d66e623bc163c6dc2 from master
2015-02-02 11:13:48 -05:00
Matt Westcott
ef90ca5f42 [1.8.x] Fixed #24255 -- Specifed 'fields' parameter in modelformset_factory / inlineformset_factory examples.
Backport of 8d64aae883f7721c33f88276e7c999844085659f from master
2015-02-02 10:47:42 -05:00
Tim Graham
3cd8f51f21 [1.8.x] Removed query.alias_diff()
This function is unused since 6fe2b001dba45134d7c10729c57959995e241a88

Backport of f79ce63fdb6788c8b4857fece6c86de57fc129ee from master
2015-02-01 21:38:34 -05:00
Tim Graham
6d0538bd8c [1.8.x] Simplified a versionchanged notes for LiveServerTestCase. 2015-02-01 21:06:27 -05:00
Tim Graham
c9df163d0c [1.8.x] Removed UpdateCacheMiddleware._session_accessed()
This method is unused since f567d04b249913db4a37adab8ba521cdc974d423

Backport of 0e6091249295b0e06aff2b1b4411819f94a1c529 from master
2015-02-01 20:35:57 -05:00
Tim Graham
7580876fbd [1.8.x] Removed Query.raise_field_error()
This method was inadvertently reintroduced in
f59fd15c4928caf3dfcbd50f6ab47be409a43b01

Backport of 99ca7c2bd3e04b343f4a0fe2d5add7c6d6f3a456 from master
2015-02-01 20:26:43 -05:00
Tim Graham
26e07a996d [1.8.x] Removed InlineAdminForm.field_count()
This method is unused since 337d102b8612503bb9dc712bfbf07432a9a96302

Backport of 327a00f48b71b5f82788f3c9ee3cdb25b8e1ef1a from master
2015-02-01 20:13:58 -05:00
Tim Graham
fe770a6452 [1.8.x] Fixed expressions test on Python 3.5; refs #23763.
Backport of 62df1834b8d60c106c8c16524b275b8a1f47ac3a from master
2015-02-01 20:11:40 -05:00
Tim Graham
c9e538b174 [1.8.x] Removed threading fallback imports.
Django imports threading in many other places without fallback.

Backport of 18f3e79b13947de0bda7c985916d5a04e28936dc from master
2015-02-01 18:45:01 -05:00
Tim Graham
0fc2f94699 [1.8.x] Removed PostgreSQL DatabaseWrapper._set_isolation_level().
This method is unused since 8717b0668caf00ec5e81ef5a1e31b4d7c64eee8a.

Backport of 64a899dc815f1a070dc7a7c22276e8bb41e46ea6 from master
2015-01-31 11:06:03 -05:00
Tim Graham
28bb0ad199 [1.8.x] Fixed #24208 -- Documented changes in private model relations.
Backport of 888054bff7c5878e026bac2e712d5480f7e295c7 from master
2015-01-31 11:03:08 -05:00
Claude Paroz
c77dd64402 [1.8.x] Fixed #14483 -- Allowed using subqueries with GIS lookups
Backport of a0b5f15ea5f from master.
2015-01-30 20:29:05 +01:00
Tim Graham
7060ef7158 [1.8.x] Reverted "Fixed #6785 -- Made QuerySet.get() fetch a limited number of rows."
This reverts commit da79ccca1d34f427952cce4555e598a700adb8de.

This optimized the unsuccessful case at the expense of the successful one.

Backport of 293fd5da5b8c7b79bd34ef793ab45c1bb8ac69ea from master
2015-01-30 12:52:39 -05:00
Andrei Kulakov
3d3c7a62c8 [1.8.x] Updated recommendation for testing keyword arg in custom fields.
Backport of dbabf43920bfd99f0e720c7c20228c17128a2af8 from master
2015-01-30 08:30:03 -05:00
Tim Graham
df68751134 [1.8.x] Fixed #24164 -- Fixed Oracle GIS limited aggregation test failure.
Backport of 29c0073335c7f7cdc482866e093e5e42a42625e5 from master
2015-01-30 06:34:36 -05:00
Simon Charette
a301061f88 [1.8.x] Fixed #23940 -- Allowed model fields to be named exact.
An explicit `__exact` lookup in the related managers filters
was interpreted as a reference to a foreign `exact` field.

Thanks to Trac alias zhiyajun11 for the report, Josh for the investigation,
Loïc for the test name and Tim for the review.

Backport of eb4cdfbdd64a95b303eaaa40a070521aa58362fd from master
2015-01-29 14:42:28 -05:00
Matt
7b92acea70 [1.8.x] Fixed #24223 -- Prevented a session test from leaking.
Backport of 55c76f4e3bab74c8544b72d11a99e94a1c2cfbce from master
2015-01-29 14:37:33 -05:00
Tim Graham
d0c343372f [1.8.x] Removed ForeignObjectRel.get_lookup_constraint() [unused].
Backport of f60973111806100d284d41c12206c04740063549 from master
2015-01-29 14:12:35 -05:00
Reza Mohammadi
590ee3ed16 [1.8.x] Fixed Persian locale FIRST_DAY_OF_WEEK & DECIMAL/THOUSAND_SEPARATORs.
Reference: http://lh.2xlibre.net/locale/fa_IR/

Backport of f1ff9407c94c4574d100efc3d224c1f79e2fb53d from master
2015-01-29 13:02:49 -05:00
Emin Mastizada
6002393a97 [1.8.x] Updated Azerbaijani language name.
Backport of 0f3ea8c0bc9c7f7f5e448b0b2137bc6351f5eae3 from master
2015-01-28 06:48:48 -05:00
Tim Graham
df7cca6dff [1.8.x] Added stub 1.7.5 release notes.
Backport of ac6033d8835ac54c1222801f6aeb47f9997b517a from master
2015-01-28 06:39:11 -05:00
Josh Smeaton
f858b51ee3 [1.8.x] Refs #14030 -- Renamed CombinableMixin to Combinable
Removed unused method and updated docstrings.

Backport of 14d0bd67d4bcf55f8a0a2b01433571a8b714121f from master
2015-01-28 11:04:12 +11:00
Josh Smeaton
6c68e40e6e [1.8.x] Refs #14030 -- Added repr methods to all expressions
Backport of 7171bf755b0c4be85ddbcc164eaf87164c131021 from master
2015-01-28 11:03:39 +11:00
Josh Smeaton
405351ba2f [1.8.x] Refs #24060 -- Added a test demonstrating reverse order isn't mutable
Backport of f218a2ff455b5f7391dd38038994f2c5f8b0eca1 from master
2015-01-28 11:03:25 +11:00
Raul Cumplido
7cc1b4710e [1.8.x] Fixed #24209 -- Prevented crash when parsing malformed RFC 2231 headers
Thanks Tom Christie for the report and review.
Backport of ac650d02cb from master.
2015-01-27 20:16:53 +01:00