Commit Graph

4384 Commits

Author SHA1 Message Date
Loic Bistuer 3fd16e6261 [1.6.x] Fixed #21581 -- Fixed a number of issues with collectstatic.
When STATIC_ROOT wasn't set, collectstatic --clear would delete
every files within the current directory and its descendants.

This patch makes the following changes:

Prevent collectstatic from running if STATIC_ROOT isn't set.

Fixed an issue that prevented collectstatic from displaying the
destination directory.

Changed the warning header to notify when the command is run
in dry-run mode.

Backport of 4befb3015c from master
2013-12-31 15:04:22 -05:00
Florian Apolloner d18f99dfc7 [1.6.x] Changed console and filebackend to use msg.as_bytes to output the data as it would get send via smtp.
Backport of c988745cca from master.
2013-12-31 12:09:52 +01:00
Florian Apolloner 7c674dd1f1 [1.6.x] Introduced as_bytes for SafeMIMEText (and other SafeMIME-classes).
This is to provide a consistent interface (namely bytes) for the smtp
backend which after all sends bytes over the wire; encoding with as_string
yields different results since mails as unicode are not really specified.

as_string stays for backwardscompatibilty mostly and some debug outputs.
But keep in mind that the output doesn't match as_bytes!

Backport of 5dfd824d38 from master.
2013-12-31 12:05:59 +01:00
Florian Apolloner ed167e53a5 [1.6.x] Worked around a bug in python 3.3.3. Refs #21093
Backport of 280c1a65cc from master.
2013-12-28 16:01:40 +01:00
Ludwik Trammer c558a43fd6 [1.6.x] Fixed #21473 -- Limited language preservation to logout
Current language is no longer saved to session by LocaleMiddleware
on  every response (the behavior introduced in #14825).
Instead language stored in session is reintroduced into new session
after logout.
2013-12-11 15:49:27 +01:00
Claude Paroz d32637d81b [1.6.x] Fixed #21510 -- Readded search reset link in changelist search bar
Thanks moritz.pfeiffer at alp-phone.ch for the report and
Tim Graham for the initial patch.
Backport of c7c647419c from master.
2013-12-11 15:32:10 +01:00
Claude Paroz 45c0d2e1ce [1.6.x] Fixed #21551 -- Reenabled loading fixtures from subdirectory
This was a regression in Django 1.6 that was only partially
restored in 839940f27f.
Thanks Jonas Haag for the report.
Backport of 41ebc4838d from master.
2013-12-07 10:48:34 +01:00
Claude Paroz 34c4b93c84 [1.6.x] Fixed #21568 -- Added missing ModelMultipleChoiceField to_python method
Thanks dibrovsd at gmail.com for the report and Simon Charette
for the review.
Backport of 8a9c8bb90 from master.
2013-12-07 10:21:05 +01:00
Baptiste Mispelon 5a4884a978 [1.6.x] Fixed #21530 -- Prevent AttributeError in default URLconf detection code.
Thanks to @dmyerscoug for the report and original patch
and to @alasdairnicol for the added tests.

Backport of a020dd0a99 from master.
2013-12-07 03:30:07 +01:00
Alasdair Nicol 87433c30c7 [1.6.x] Fixed #21538 -- Added numpy to test/requirements/base.txt
Thanks Tim Graham for the report

Backport of c75dd664cf from master
2013-12-02 13:38:46 -05:00
Tim Graham adb8c563ed [1.6.x] Fixed incorrect type for max_length.
Backport of 3b60ffa334 from master
2013-12-01 14:26:42 -05:00
Claude Paroz 655b8bb10b [1.6.x] Fixed #21448 -- Fixed test client logout with cookie-based sessions
Thanks Gunnar Scherf for the report and the suggested patch.
Backport of 384816fcc from master.
2013-11-26 20:42:54 +01:00
Ramiro Morales 8750296918 [1.6.x] Fixed #21488 -- Multiple locales treatment in i18n commands.
Removed multiple locales separated by commas variation (that wasn't
working as documented) in favor of simply allowing use of the
``--locale``/``-l`` options more than once for ``makemessages`` and
``compilemessages``.

Thanks Romain Beylerian for the report and Claude, Simon for their help.
2013-11-23 11:02:30 -03:00
Bouke Haarsma d55df0b810 [1.6.x] Fixed #21443 -- Cannot show debug info on PY3's importlib
Thanks productions@zaziork.co.uk for the review.
Backport of 18185724e6 from master.
2013-11-22 20:37:09 +01:00
Claude Paroz 9cbcd06b1a [1.6.x] Fixed #21405 -- Prevented queryset overwrite in BaseModelAdmin
Thanks guido@20tab.com for the report and Tim Graham for the
analyze.
Backport of 1718b5256c from master.
2013-11-21 22:24:00 +01:00
Anssi Kääriäinen 5730bf2819 [1.6.x] Fixed #21431 -- GenRel->FK list_filter regression in admin
Report, analysis and tests from stephenmcd.

Backpatch of 752d3d70da from master.
2013-11-21 15:34:04 +02:00
Claude Paroz d8fdee7db8 [1.6.x] Fixed #21472 -- Fixed inline formsets display when parent pk is 0
Thanks agale031176@gmail.com for the report.
Backport of fafb6cf049 from master.
2013-11-20 21:37:35 +01:00
Claude Paroz 833f7d11e8 [1.6.x] Fixed #21457 -- Allowed fixture file name to contain dots
Thanks Keryn Knight for the report.
Backport of 97ac22ebfc from master.
2013-11-18 20:34:39 +01:00
Anssi Kääriäinen 1fd762c106 [1.6.x] Fixed #21428 -- editable GenericRelation regression
The GenericRelation refactoring removed GenericRelations from
model._meta.many_to_many. This had the side effect of disallowing
editable GenericRelations in ModelForms. Editable GenericRelations
aren't officially supported, but if we don't fix this we don't offer any
upgrade path for those who used the ability to set editable=True
in GenericRelation subclass.

Thanks to Trac alias joshcartme for the report and stephencmd and Loic
for working on this issue.

Backpatch of 0e079e4331 from master.
2013-11-16 20:15:46 +02:00
Baptiste Mispelon 2a0039ba62 Fixed Python2.6 incompatibility caused by 67c30426c1. 2013-11-15 00:24:11 +01:00
Baptiste Mispelon 2cfff0cb72 Fixed wrong override_settings path introduced by 67c30426c1. 2013-11-14 23:09:20 +01:00
Loic Bistuer 67c30426c1 [1.6.x] Fixed #21432 -- DateTimeQuery now copies tzinfo when cloning.
Thanks Enrique Martínez for the report and @bmispelon for the tests.

Backport of 17ed99f3a3 from master.
2013-11-14 21:39:24 +01:00
Loic Bistuer b107421acf [1.6.x] Fixed #21410 -- prefetch_related() for ForeignKeys with related_name='+'
Regression introduced by commit 9777442.

Thanks to trac username troygrosfield for the report and test case.

Backpatch of cb83448891 from master.

Conflicts:

	tests/prefetch_related/models.py
2013-11-13 07:41:30 +02:00
Ramiro Morales 7f5555db2b [1.6.x] Workaround admin scripts test failures on Windows+Python 3.
Change strategy used to examine instrumented output to acommodate the
fact that on Windows, where the path separator is '\', repr() of Python
modules has changed in Python 3 to use escaped backslashes in the FS
path section (e.g.
'C:\\python3x\\Lib\\site-packages\\django\\contrib\\auth\\models.py')
without having to special-case based on platform.

c04f3fc686 from master.
2013-10-23 09:27:18 -03:00
Ramiro Morales bcc65c13a0 [1.6.x] Fixed #21307 -- Moved TransRealMixin to django.test.utils.
51d2e1fb23 from master.
2013-10-22 22:40:01 -03:00
Ramiro Morales b987fb188d [1.6.x] Decode from UTF-8 explicitly when reading a text file in makemessages.
This shows itself with Python 3 under Windows where UTF-8 usually isn't
the default file I/O encoding and caused one failure and three errors
in our test suite under that platform setup.

b5f52647fe from master.
2013-10-22 07:38:02 -03:00
Ramiro Morales 7130609654 [1.6.x] Fixed an I18N test class tearDown method.
a3690168cb from master.
2013-10-22 06:37:18 -03:00
Claude Paroz 621fc1f1d7 [1.6.x] Fixed #21284 -- Prevented KeyError swallowing in fetch_command
Thanks wildfire for the report.

Backport of 3514bcb251 from master.
2013-10-18 14:05:26 +02:00
Claude Paroz b2f9c74ed1 [1.6.x] Fixed #21282 -- Made HttpResponse.serialize_headers accept latin-1
Thanks Raphaël Barrois for the report and the initial patch and
Aymeric Augustin for the review.

Backport of a14f087233 from master.
2013-10-17 18:15:56 +02:00
Claude Paroz ba9cf9596b [1.6.x] Fixed #21269 -- Don't crash when CommandError contains non-ascii
Thanks kontakt@eikefoken.de for the report.

Backport of 42a67ec1cd from master.
2013-10-14 21:28:29 +02:00
Aymeric Augustin f0c7649b16 Fixed #21198 -- Prevented invalid use of @python_2_unicode_compatible.
Thanks jpic for the report and chmodas for working on a patch.

Reverts 2ea80b94. Refs #19362.

Conflicts:
	tests/utils_tests/test_encoding.py
2013-10-13 18:25:21 +02:00
Aymeric Augustin ddff6522fa [1.6.x] Fixed #19560 -- Identified field in warning for naive datetime.
Thanks gcc for the report and vajrasky for the patch.

Backport of 570d9c2678 from master.
2013-10-13 11:58:12 +02:00
Russell Keith-Magee 1bf95803f3 [1.6.x] Fixed #21243 -- Corrected exception message in multiple database tests.
Thanks to vajrasky for the report and patch.

Backport of a971d19 from trunk.
2013-10-09 09:06:59 +08:00
Russell Keith-Magee 7f0fdffd07 [1.6.x] Refs #21197 -- Clarified upgrade check message.
Thanks to Carl and Shai for the discussion.

Backport of 8ff4303 from master.
2013-10-08 10:02:08 +08:00
Ramiro Morales 5252885494 [1.6.x] Fixed #21165 -- Fix test for syndication feed timestamp field on Windows.
Thanks Michael Manfre for the report, Raphaël Barrois for the patch and
Claude Paroz, Aymeric Augustin for the reviews.

Refs #7936

62dfd79f8b from master.
2013-10-03 22:50:51 -03:00
Kevin Christopher Henry 02c7dbd255 [1.6.x] Fixed #21122 -- Improved clean up of test temp directory on Windows
- Fixed test that didn't close the files it opened
- Caught and handled exception when temp directory cannot be removed

Backport of 978e1351a6 of master
2013-10-02 19:13:20 -04:00
Tim Graham dc26f3fc9b [1.6.x] Fixed Python 2.6 compatability for 3ec368014d. 2013-10-02 10:01:48 -04:00
tschilling e5b0f5b95d [1.6.x] Fixed #21129 -- Prevented admin filter params modifications from throwing an exception.
Thanks Tuttle for the report.

Backport of 5381317fe3 from master
2013-10-02 09:13:59 -04:00
Ramiro Morales 4290cc1d6e [1.6.x] Made test for issue 19552 compatible with Windows.
Take in account platform path separator. Refs #19552.

651bed0918 from master.
2013-10-02 07:35:00 -03:00
Ramiro Morales 3ec368014d [1.6.x] Made skipping of symlink-related makemessages test smarter.
os.symlink() is available starting with Windows Vista but can fail at
runtime.

0f46ec315e from master.
2013-10-02 07:33:52 -03:00
Ramiro Morales 65950805eb [1.6.x] Fixed tests breakage from last commit. 2013-10-01 21:04:28 -03:00
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
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
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
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