Commit Graph

15609 Commits

Author SHA1 Message Date
Ramiro Morales d16753eecd [1.6.x] Fixed #21209 -- .po file path comments on Windows.
Literals from source files with Django template language syntax don't
have a '.py' suffix anymore.

Also, the '.\' prefix is preserved to respect GNU gettext behavior on
that platform.

Refs #16903.

4b715fc05a from master.
2013-10-01 20:42:13 -03:00
Anssi Kääriäinen 9972a101e6 [1.6.x] Fixed #21203 -- resolve_columns fields misalignment
In queries using .defer() together with .select_related() the values
and fields arguments didn't align properly for resolve_columns().

Backpatch of bf13c75c0d from master.
2013-10-01 20:47:28 +03:00
Claude Paroz 5b97b99a01 [1.6.x] Factorized requires_tz_support decorator in test utils
Thanks Aymeric Augustin for the suggestion. Refs #21165.
Backport of c1c44b2506 from master.
2013-10-01 13:28:24 +02:00
Ramiro Morales 47a65ad40e [1.6.x] Force Unix-style line-endings for some helper files in staticfiles_tests.
This fixes eight failures in the cached storage tests under Windows.

Refs #18920 and 978d4476cf.

4372718e83 from master.
2013-09-30 22:17:29 -03:00
Curtis Maloney 98773c4bb5 [1.6.x] Fixed #21154 -- Updated TemplateResponse docs to better explain context.
Thanks mrmachine for the report.

Backport of c39c9f2ad8 from master
2013-09-30 10:21:34 -04:00
Aymeric Augustin 0d74bdaf0c Fixed #21134 -- Prevented queries in broken transactions.
Backport of 728548e4 from master.

Squashed commit of the following:

commit 63ddb271a44df389b2c302e421fc17b7f0529755
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Sun Sep 29 22:51:00 2013 +0200

    Clarified interactions between atomic and exceptions.

commit 2899ec299228217c876ba3aa4024e523a41c8504
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Sun Sep 22 22:45:32 2013 +0200

    Fixed TransactionManagementError in tests.

    Previous commit introduced an additional check to prevent running
    queries in transactions that will be rolled back, which triggered a few
    failures in the tests. In practice using transaction.atomic instead of
    the low-level savepoint APIs was enough to fix the problems.

commit 4a639b059ea80aeb78f7f160a7d4b9f609b9c238
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Tue Sep 24 22:24:17 2013 +0200

    Allowed nesting constraint_checks_disabled inside atomic.

    Since MySQL handles transactions loosely, this isn't a problem.

commit 2a4ab1cb6e83391ff7e25d08479e230ca564bfef
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Sat Sep 21 18:43:12 2013 +0200

    Prevented running queries in transactions that will be rolled back.

    This avoids a counter-intuitive behavior in an edge case on databases
    with non-atomic transaction semantics.

    It prevents using savepoint_rollback() inside an atomic block without
    calling set_rollback(False) first, which is backwards-incompatible in
    tests.

    Refs #21134.

commit 8e3db393853c7ac64a445b66e57f3620a3fde7b0
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Sun Sep 22 22:14:17 2013 +0200

    Replaced manual savepoints by atomic blocks.

    This ensures the rollback flag is handled consistently in internal APIs.
2013-09-30 10:14:22 +02:00
Ramiro Morales c4468e0619 [1.6.x] Modified test added in 3afb5916b2 so it doesn't fail on Windows.
Refs #18091.

12ca312e1b from master.
2013-09-29 22:57:04 -03:00
Michael Manfre 5d72ce061f [1.6.x] Fixed #21167 - Improved queries.tests.SubqueryTests
Improve tests to cover slicing scenarios that could be handled in unique
ways by 3rd party database backends.

Backport of b0e06c3662 from master
2013-09-29 17:37:45 +03:00
Ramiro Morales 5303afcd97 [1.6.x] Note about static files dirs paths on Windows.
Added it to the settings reference. We used to have it in comment form
in our old, bigger default project template settings.py file.

5866a49369 from master.
2013-09-28 20:35:47 -03:00
Baptiste Mispelon c2a35d40db [1.6.x] Fixed #21186: Fixed regression when using date fields in the admin's list_filter.
Thanks to onlygoldi2201 for the report and to ramiro and apollo13
for the reviews.

Backport of 8f51ba669a from master.
2013-09-28 00:46:37 +02:00
Baptiste Mispelon 15bdc85117 [1.6.x] Fix #21185: Added tests for unescape_entities.
Also fixed a py3 incompatibility.
Thanks to brutasse for the report.

Backport of 3754f4ad41 from master.
2013-09-27 18:06:28 +02:00
Javed Khan f621aba99b [1.6.x] Fixed an ImportError in `django.core.cache.backends.db`
It was introduced by a979a2fea5.
2013-09-27 03:21:54 -04:00
Michael Manfre a979a2fea5 [1.6.x] Fixed #21146 - DatabaseCache converts expires to python value
DatabaseCache uses raw cursors to bypass the ORM. This prevents it from
being used by database backends that require special handling of datetime
values.

There is no easy way to test this, so no tests added.

Backport of d5606b5763 from master
2013-09-26 13:42:32 +03:00
Tim Graham d1047c8b4c [1.6.x] Fixed #21116 -- Made usage of manage.py in docs more consistent.
Thanks daniel.quattro at gmail.com for the report.

d1c9802811 from master.
2013-09-25 21:11:17 -03:00
Anssi Kääriäinen d7ae0bc372 [1.6.x] Fixed #21126 -- QuerySet value conversion failure
A .annotate().select_related() query resulted in misaligned rows vs
columns for compiler.resolve_columns() method.

Report & patch by Michael Manfre.

Backpatch of 83554b018e from master.
2013-09-25 20:50:48 +03:00
Baptiste Mispelon 5207928151 [1.6.X] Fixed wording in unit tests documentation.
Backport of 42b9feb2e7 from master.
2013-09-25 18:31:03 +02:00
Florian Apolloner e5dc08f2db [1.6.x] Fixed #21138 -- Increased the performance of our PBKDF2 implementation.
Thanks go to Michael Gebetsroither for pointing out this issue and help on
the patch.

Backport of 68540fe4df from master.
2013-09-24 21:10:21 +02:00
Florian Apolloner 50a811a170 Revert "[1.6.x] Ensure that passwords are never long enough for a DoS."
This reverts commit 5ecc0f828e.

This fix is no longer necessary, our pbkdf2 (see next commit) implementation
no longer rehashes the password every iteration.
2013-09-24 21:09:52 +02:00
Anssi Kääriäinen 1a922870ea [1.6.x] Fixed #21150 -- Improved Query.add_fields() join promotion logic
Thanks to Eivind Fonn for the report and test case.
2013-09-24 19:04:42 +03:00
Tim Graham d30d66b907 [1.6.x] Fixed #21137 -- Corrected ULRconf include example.
Thanks marfire for the report.

Backport of 77f6b468e5 from master
2013-09-24 09:41:39 -04:00
Michał Lech 11dfb58131 [1.6.x] Marked PermissionsMixin.user_permissions help_text for translation
Backport of 53c7d66869 from master
2013-09-24 07:37:12 -04:00
Brett Koonce db98c48884 [1.6.x] Removed extra p (topppings->toppings)
Backport of 946a2226ea from master
2013-09-23 19:25:07 -04:00
Tim Graham 34f4053409 [1.6.x] Removed implication that six is part of Python stdlib.
Backport of 45969bdeb5 from master
2013-09-23 18:30:18 -04:00
Louis Fill a6a5c8b06d [1.6.x] Fixed #21070 -- Added a more complex database configuration example.
Thanks joejasinski for the suggestion.

Backport of e15f7f31d0 from master
2013-09-23 12:18:47 -04:00
Daley Chetwynd 5e549e7efe [1.6.x] Fixed #20830 -- Clarified that Django uses a customized version of six.
Thanks glarrain for the suggestion.

Backport of a53caf28bf from master
2013-09-23 11:07:36 -04:00
Ben Huckvale cdb56725d4 [1.6.x] Fixed #21120 -- Added more explicit text on using validators and link to writing validators.
Thanks nicolas at niconomicon.net for the suggestion.

Backport of 98e0453f00 from master
2013-09-23 10:39:10 -04:00
Tim Garner 6e6d1b1ba8 [1.6.x] Fixed #21702 -- Added different bullet styles for nested lists.
Thanks moc at mocpa.com for the suggestion.

Backport of c81b6f7b83 from master
2013-09-23 07:40:01 -04:00
Florian Apolloner eb32de2614 [1.6.x] Stopped a test from executing queries at the module level.
Currently module level queries are executed against the real database
(specified in NAME) instead of the test database; since it is to late
to fix this for 1.6, we at least ensures stable builds. Refs #21443.

Backport of 4fcc1e4ad8 from master.
2013-09-22 23:05:16 +02:00
Florian Apolloner 56201fe5a8 [1.6.x] Fixed "Address already in use" from liveserver.
Our WSGIServer rewrapped the socket errors from server_bind into
WSGIServerExceptions, which is used later on to provide nicer
error messages in runserver and used by the liveserver to see if
the port is already in use. But wrapping server_bind isn't enough since
it only binds to the socket, socket.listen (which is called from
server_activate) could also raise "Address already in use".

Instead of overriding server_activate too I chose to just catch socket
errors, which seems to make more sense anyways and should be more robust
against changes in wsgiref.

Backport of 2ca00faa91 from master.
2013-09-22 22:04:50 +02:00
Ramiro Morales b2876c0c91 [1.6.x] A few doc additions for changes from d228c1192e.
ce0c5c38ea from master.
2013-09-22 13:54:54 -03:00
Ramiro Morales aef809f90c [1.6.x] Reference Meta.index_together in DB performance guide.
9dc45efeba from master.
2013-09-22 13:54:02 -03:00
mlissner 14f76b15c4 [1.6.x] Correct very minor typo
Just changed as to has.

Backport of d8f2d940cc from master
2013-09-21 18:18:42 -04:00
Michael DiBernardo bb8a087949 [1.6.x] Fixed #21137 -- Documented best practice for URLconfs with repeated pattern prefixes.
Backport of 222460a994 from master
2013-09-21 18:18:16 -04:00
Aymeric Augustin e76dd4cd1a [1.6.x] Fixed #21074 -- Added tests for localized datetime fields.
Fields must render values in the current time zone.

This commit only contains tests because this ticket was just a symptom of
a regression from #18777 that was fixed separately.

Backport of 5444a9c from master.
2013-09-21 23:11:04 +02:00
Florian Apolloner ece8d65217 [1.6.x] Ensured that BoundField.as_widget always returns properly localized fields.
This is a follow-up to #18777 which improperly converted to strings in
prepare_value and as such caused regressions like #21074.

Refs #18777, #21074

Backport of 56743cf9e3 from master.
2013-09-21 22:58:18 +02:00
Curtis Maloney e94efee946 [1.6.x] Fixed #21133 -- Clarifed documentation about strftime formatting.
Backport of 43a2ec7999 from master
2013-09-21 06:56:00 -04:00
Aymeric Augustin 0ad178c43d [1.6.x] Clarified why one must not catch database errors inside atomic.
Backport of 4db2752 from master.
2013-09-20 21:57:39 +02:00
Paul McMillan 85ba68cc14 [1.6.x] Increased default PBKDF2 iterations
Increases the default PBKDF2 iterations, since computers have gotten
faster since 2011. In the future, we plan to increment by 10% per
major version.

Backport of a075e2ad0d from master
2013-09-19 15:34:59 -04:00
Markus Amalthea Magnuson 9888bb28ee [1.6.x] Added missing "in" in sentence.
Backport of 2c5c422d34 from master
2013-09-19 13:29:48 -04:00
Tim Graham 538fdd2ae4 [1.6.x] Added __pycache__ to gitignore
Backport of 55b9bff07f from master
2013-09-19 06:37:53 -04:00
Russell Keith-Magee 886e876c72 [1.6.x] Fixed #21121: Added archive of security issues.
Backport of 9d3e60aa3e, 8e134c27c9, 8b3bae9466, c65ae7c969, bbabc5325c,
and a2e25e8a83 from master.
2013-09-19 15:02:52 +08:00
Tim Graham 091ae7f172 Removed accidentally added pyc file.
Thanks Simon Charette for the report.
2013-09-18 20:27:07 -04:00
Tim Graham 778d4da9cc [1.6.x] Fixed #21098 -- Applied sensitive_post_parameters to MultiValueDict
Thanks simonpercivall for the report and bmispelon for the review.

Backport of 2daada800f from master
2013-09-18 09:56:01 -04:00
Tim Graham dbad65ded7 [1.6.x] Fixed bad backport in last commit; refs #21118 2013-09-18 09:52:29 -04:00
Tim Graham 14e139ecdf [1.6.x] Fixed #21118 -- Isolated a test that uses the database.
Thanks rmboggs for the report.

Backport of 4f40b97d97 from master
2013-09-18 09:43:10 -04:00
Tim Graham 275497c570 [1.6.x] Fixed #15625 -- Made message in MultiValueDictKeyError less verbose.
Thanks margieroginski for the suggestion.

Backport of 893198509e from master
2013-09-18 06:49:59 -04:00
Florian Apolloner 325b03ea84 [1.6.x] Final attempt to solve sporadic test failures.
tearDownClass is not called if setUpClass throws an exception, in our case
this means that LiveServerTestCase leaks LiveServerThread sockets if the
test happens to be skipped later on, and AdminSeleniumWebDriverTestCase
doesn't close it's already open browser window. To prevent this leakage
we catch errors where needed and manually call _tearDownClassInternal.
_tearDownClassInternal should be written as defensively as possible since
it is not allowed to make any assumptions on how far setUpClass got.

This patch should fix the sporadic "Address already in use"-errors on jenkins
and also the "This code isn't under transaction management"-error for sqlite
(also just on jenkins).

After discussion with koniiiik, jezdez, kmtracey, tos9, lifeless, nedbat and
voidspace it was decided that this is the safest approach (thanks to everyone
for their comments and help). Manually calling tearDownClass was shut down
cause we don't know how our users override our classes.

This is a private and very specialized API on purpose and should not be used
without a strong reason!

This patch partially reverts the earlier attempts to fix those issues,
namely:
	2fa0dd73b1 and
	3c5775d36f

Final note: If this patch breaks in a later version of Django, please be
very careful on how you fix it, you might not see test failures locally.
That said, this patch hopefully doesn't produce even more failures.

Backport of 73a610d2a8 from master.
2013-09-17 18:36:32 +02:00
Anssi Kääriäinen 5937f291c1 [1.6.x] Fixed #21109 -- made db cursor error wrapping faster
Backpatch of 9400142132 from master.
2013-09-17 12:31:13 +03:00
Ramiro Morales c0625a74ce [1.6.x] Reworded a paragraph in the logging docs.
9d12f68a53 from master.
2013-09-16 17:52:13 -03:00
Tim Graham e96bcdd64f [1.6.x] Cleaned up 1.5.4/1.4.8 release notes
Backport of 8d29005524 from master
2013-09-15 14:22:24 -04:00