1
0
mirror of https://github.com/django/django.git synced 2024-12-23 09:36:06 +00:00
Commit Graph

19880 Commits

Author SHA1 Message Date
Tim Graham
570912a97d Added a "Writing migrations" how-to. 2015-02-03 13:09:54 -05:00
minusf
66f5aa9fa5 Fixed typos in docs/ref/forms/validation.txt. 2015-02-03 12:26:58 -05:00
Claude Paroz
cd0ceaa102 Fixed #24252 -- Forced lazy __str__ to utf-8 on Python 2
Thanks Stanislas Guerra for the report and Tomas Ehrlich for
the review.
2015-02-03 18:23:41 +01:00
Matthew Somerville
250aa7c39b 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.
2015-02-03 18:18:12 +01:00
Preston Timmons
cd4282816d Fixed #18651 -- Enabled optional assignments for simple_tag(). 2015-02-03 10:44:33 -05:00
Anssi Kääriäinen
8adc59038c 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.
2015-02-03 09:23:44 -05:00
Tim Graham
118b11221f Fixed #24263 -- Prevented extra queries on BaseDateDetailView with a custom queryset.
Thanks jekka-ua for the report and patch.
2015-02-03 09:12:37 -05:00
Tim Graham
9a391fbd61 Fixed broken links in class based views flattend index; refs #24250. 2015-02-03 09:10:55 -05:00
Tim Graham
5d193d042a Fixed #24250 -- Corrected mistakes in FormMixin docs. 2015-02-03 08:41:57 -05:00
Aymeric Augustin
2133f3157e 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.
2015-02-03 08:29:45 +01:00
Tim Graham
a53541852d Removed contrib.auth.forms.mask_password()
This function is unused since dce820ff70
after being introduced in 718a5ba1a1
2015-02-02 11:13:14 -05:00
Matt Westcott
8d64aae883 Fixed #24255 -- Specifed 'fields' parameter in modelformset_factory / inlineformset_factory examples. 2015-02-02 10:46:33 -05:00
Tim Graham
f79ce63fdb Removed query.alias_diff()
This function is unused since 6fe2b001db
2015-02-01 21:37:25 -05:00
Tim Graham
c79faae761 Removed versionadded/changed notes for 1.7. 2015-02-01 21:02:40 -05:00
Tim Graham
0e60912492 Removed UpdateCacheMiddleware._session_accessed()
This method is unused since f567d04b24
2015-02-01 20:33:22 -05:00
Tim Graham
99ca7c2bd3 Removed Query.raise_field_error()
This method was inadvertently reintroduced in
f59fd15c49
2015-02-01 20:26:04 -05:00
Tim Graham
327a00f48b Removed InlineAdminForm.field_count()
This method is unused since 337d102b86
2015-02-01 20:13:12 -05:00
Tim Graham
62df1834b8 Fixed expressions test on Python 3.5; refs #23763. 2015-01-31 19:59:17 -05:00
Tim Graham
75303b01a9 Fixed #24245 -- Added introspection for database defaults.
Needed for tests for migrations handling of database defaults.
2015-01-31 12:33:11 -05:00
Tim Graham
64a899dc81 Removed PostgreSQL DatabaseWrapper._set_isolation_level().
This method is unused since 8717b0668c.
2015-01-31 11:05:26 -05:00
Tim Graham
888054bff7 Fixed #24208 -- Documented changes in private model relations. 2015-01-31 11:01:55 -05:00
Claude Paroz
a0b5f15ea5 Fixed #14483 -- Allowed using subqueries with GIS lookups 2015-01-30 20:27:18 +01:00
Tim Graham
293fd5da5b 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.
2015-01-30 12:51:12 -05:00
Andrew Godwin
955f70904a Also, I apparently can't spell San Francisco. 2015-01-30 08:55:20 -08:00
Andrew Godwin
277100057d Forgot to update where I live when I moved. 2015-01-30 08:54:29 -08:00
Loic Bistuer
4c3bfe9053 Fixed #24211 -- Removed ValuesQuerySet() and ValuesListQuerySet().
Thanks Anssi Kääriäinen, Marc Tamlyn, and Tim Graham for the reviews.
2015-01-30 22:02:58 +07:00
Andrei Kulakov
dbabf43920 Updated recommendation for testing keyword arg in custom fields. 2015-01-30 08:29:17 -05:00
Tim Graham
29c0073335 Fixed #24164 -- Fixed Oracle GIS limited aggregation test failure. 2015-01-30 06:28:47 -05:00
Samuel Colvin
5b74134f27 Fixed #24145 -- Added PUT & PATCH to CommonMiddleware APPEND_SLASH redirect error. 2015-01-29 15:23:01 -05:00
Simon Charette
eb4cdfbdd6 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.
2015-01-29 14:40:20 -05:00
Matt
55c76f4e3b Fixed #24223 -- Prevented a session test from leaking. 2015-01-29 14:36:01 -05:00
Tim Graham
f609731118 Removed ForeignObjectRel.get_lookup_constraint() [unused]. 2015-01-29 13:31:12 -05:00
Reza Mohammadi
f1ff9407c9 Fixed Persian locale FIRST_DAY_OF_WEEK & DECIMAL/THOUSAND_SEPARATORs.
Reference: http://lh.2xlibre.net/locale/fa_IR/
2015-01-29 12:55:20 -05:00
Tim Graham
63412262e5 Fixed #24175 -- Updated docstring convention. 2015-01-29 12:21:44 -05:00
Tim Graham
18f3e79b13 Removed threading fallback imports.
Django imports threading in many other places without fallback.
2015-01-28 10:23:25 -05:00
Tim Graham
cd91486213 Fixed flake8 warning. 2015-01-28 07:00:52 -05:00
Jon Dufresne
24b2bc635e Fixed #24137 -- Switched to HTTP reason phrases from Python stdlib. 2015-01-28 06:59:40 -05:00
Emin Mastizada
0f3ea8c0bc Updated Azerbaijani language name. 2015-01-28 06:48:09 -05:00
Tim Graham
ac6033d883 Added stub 1.7.5 release notes. 2015-01-28 06:38:31 -05:00
Josh Smeaton
14d0bd67d4 Refs #14030 -- Renamed CombinableMixin to Combinable
Removed unused method and updated docstrings.
2015-01-28 10:59:30 +11:00
Josh Smeaton
7171bf755b Refs #14030 -- Added repr methods to all expressions 2015-01-28 10:59:30 +11:00
Josh Smeaton
f218a2ff45 Refs #24060 -- Added a test demonstrating reverse order isn't mutable 2015-01-28 10:59:30 +11:00
Raul Cumplido
ac650d02cb Fixed #24209 -- Prevented crash when parsing malformed RFC 2231 headers
Thanks Tom Christie for the report and review.
2015-01-27 20:12:22 +01:00
Loic Bistuer
332139d23d Fixed typo in docs. Thanks Berker. 2015-01-28 01:50:05 +07:00
Markus Holtermann
335df82a3f Corrected naming of method and attribute 2015-01-27 19:45:52 +01:00
Tim Graham
6f8418089c Added 1.4.19 release notes. 2015-01-27 11:48:04 -05:00
Loic Bistuer
728b6fd9ca Fixed #24219 -- Moved SelectDateWidget together with the other widgets
and deprecated django.forms.extras.

Thanks Berker Peksag and Tim Graham for the reviews.
2015-01-27 22:40:02 +07:00
Loic Bistuer
3a4c9e1b43 Cleaned up some forms tests.
Thanks Berker Peksag and Tim Graham for the reviews. Refs #24219.
2015-01-27 22:39:57 +07:00
Loic Bistuer
84b6c76830 Fixed #24210 -- Cleaned up relational fields __init__().
Thanks Collin Anderson and Tim Graham for the reviews.
2015-01-27 22:35:49 +07:00
Markus Holtermann
da224d6be0 Refs #24104 -- Added missing release notes
Forwardport of 3d4a826174 from stable/1.7.x
2015-01-27 15:35:34 +01:00