Commit Graph

20020 Commits

Author SHA1 Message Date
Tim Graham fc1e9107d7 [1.8.x] Added UUIDField.deconstruct()
Backport of 0f54cf28c0 from master
2015-02-05 19:15:37 -05:00
Markus Holtermann c9addfd4bf [1.8.x] Fixed small regression caused by e3702dc3f2
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 235124d3ea 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 0204714b0b 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 737b184d91 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 caa3562d5b 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 2730dad0d7 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 2be621e44c 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 7d363ed432 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 79f27f2b61 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 c0cc8f69e7 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 65e005f8cd 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 281fc03474 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 e8171daf0c.

A new solution is forthcoming.

Backport of 0e489c19f1 from master
2015-02-03 15:24:24 -05:00
Tim Graham ff39de1e1e [1.8.x] Added a "Writing migrations" how-to.
Backport of 570912a97d 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 66f5aa9fa5 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 8adc59038c 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 118b11221f 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 9a391fbd61 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 5d193d042a 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 dce820ff70
after being introduced in 718a5ba1a1

Backport of a53541852d 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 8d64aae883 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 6fe2b001db

Backport of f79ce63fdb 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 f567d04b24

Backport of 0e60912492 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
f59fd15c49

Backport of 99ca7c2bd3 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 337d102b86

Backport of 327a00f48b 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 62df1834b8 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 18f3e79b13 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 8717b0668c.

Backport of 64a899dc81 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 888054bff7 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 a0b5f15ea5 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 da79ccca1d.

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

Backport of 293fd5da5b 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 dbabf43920 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 29c0073335 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 eb4cdfbdd6 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 55c76f4e3b from master
2015-01-29 14:37:33 -05:00
Tim Graham d0c343372f [1.8.x] Removed ForeignObjectRel.get_lookup_constraint() [unused].
Backport of f609731118 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 f1ff9407c9 from master
2015-01-29 13:02:49 -05:00
Emin Mastizada 6002393a97 [1.8.x] Updated Azerbaijani language name.
Backport of 0f3ea8c0bc 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 ac6033d883 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 14d0bd67d4 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 7171bf755b 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 f218a2ff45 from master
2015-01-28 11:03:25 +11:00