Commit Graph

3749 Commits

Author SHA1 Message Date
Claude Paroz 41848b078a [1.5.x] Fixed #19833 -- Fixed import parameter encoding in get_runner
Thanks Danilo Bargen for the report.
Backport of 63236161 from master.
2013-02-16 13:32:03 +01:00
Julien Phalip 42e87c17f2 [1.5.x] Fixed #19829 -- Fixed index lookups for NumPy arrays in templates.
Backport of 7d5e35cdb4
2013-02-15 00:18:49 -08:00
Anssi Kääriäinen 743263a105 [1.5.x] Removed try-except in django.db.close_connection()
The reason was that the except clause needed to remove a connection
from the django.db.connections dict, but other parts of Django do not
expect this to happen. In addition the except clause was silently
swallowing the exception messages.

Refs #19707, special thanks to Carl Meyer for pointing out that this
approach should be taken.
2013-02-13 00:22:10 +02:00
Anssi Kääriäinen 7b5ca126ee [1.5.x] Fixed #19112 -- Reduced the amount of query params in a test
Backpatch of 604d8763dc.
2013-02-10 21:09:58 +02:00
Anssi Kääriäinen b18ad807e0 [1.5.x] Fixed #19720 -- Oracle ordering related delete regression
When a query had a complex where condition (a condition targeting more
than the base table) a subquery was used for deletion. However, the
query had default ordering from the model's meta and Oracle doesn't
work with ordered subqueries.

The regression was caused by fast-path deletion code introduced in
1cd6e04cd4 for fixing #18676.

Thanks to Dylan Klomparens for the report.

Backpatch of 8ef3235034
2013-02-10 19:58:22 +02:00
Anssi Kääriäinen 60186aa2e5 [1.5.x] Fixed #19707 -- Reset transaction state after requests
Backpatch of a4e97cf315
2013-02-10 14:09:58 +02:00
Anssi Kääriäinen 4c261c61f2 [1.5.x] Fixed #19645 -- Added tests for TransactionMiddleware
Backpatch of f556df90be. Backpatching
these tests so that it will be easier to backpatch the fix for #19707.
2013-02-10 14:01:49 +02:00
Julien Phalip 15796db507 [1.5.x] Cleaned up some lingering signals in the test suite that were causing spurious failures with Pypy and Postgres.
Backport of db09a2de6e
2013-02-08 12:13:43 -08:00
Julien Phalip 5ba76825cf [1.5.x] Fixed a typo in the test suite that was causing some spurious failures with pypy.
Backport of 6afc85af47
2013-02-06 22:12:02 -08:00
Claude Paroz 20ac33100c Partially revert 9efe1a721, strip_tags improvements
The new regex seems not stable enough for being released. Stripping
with regex might need reevaluation for the next release.
Refs #19237.
2013-02-06 21:19:41 +01:00
Nick Sandford e18bd68dbc [1.5.x] Fixed #19445 -- Skip admin fieldsets validation when the ModelAdmin.get_form() method is overridden.
Backport of 0694d2196f
2013-02-02 14:55:59 -08:00
Aymeric Augustin db49b6d2b2 [1.5.x] Fixed #19708 -- Exception in timezone.override(None).
Thanks rafales.

Backport of 9a4a1ce.
2013-01-31 16:02:03 +01:00
Aymeric Augustin 11ec0253ab [1.5.x] Fixed #19692 -- Completed deprecation of mimetype in favor of content_type.
Thanks Tim for the report and initial patch.

Backport of 89cb771 from master.
2013-01-31 13:55:00 +01:00
Aymeric Augustin 256352a790 Added file forgotten in d5ad9d3d. 2013-01-30 22:11:19 +01:00
Aymeric Augustin d5ad9d3dfe [1.5.x] Fixed #19076 -- Added content_type attribute to TemplateView.
Thanks Gavin Wahl.

Backport of 23e319d.
2013-01-30 21:34:39 +01:00
Tim Graham 5da6ce11ed [1.5.x] Fixed typos in docs and comments
Backport of ee26797cff from master
2013-01-29 10:58:24 -07:00
Claude Paroz 2d8b0315f4 [1.5.x] Fixed #19665 -- Ensured proper stderr output for Command.run_from_argv
Thanks Stefan Koegl for the report and Simon Charette for the review.
Backport of b9c8bbf37 from master.
2013-01-25 14:57:18 +01:00
Anssi Kääriäinen f4132140f5 [1.5.x] Fixed #19652 -- Fixed .none() regression in related fields
The regression was caused by using .none() when querying for related
models, and the origin field's value was None. This resulted in missing
custom related manager subclass as .none() returns plain QuerySet.

This isn't backport from master, in master .none() correctly preserves
the queryset's class.

Patch provided by Simon Charette, with some minor polish by committer.
2013-01-23 08:26:34 +02:00
Claude Paroz ab6ff2e0ac Fixed i18n test to match changed translation 2013-01-17 22:58:53 +01:00
Claude Paroz b3887ab98a [1.5.x] Fixed #19488 -- Made i18n_patterns redirect work with non-slash-ending paths
Thanks Daniel Gerzo for the report and the initial patch.
Backport of bcdb4898c from master.
2013-01-11 21:35:45 +01:00
Claude Paroz 1d03ff06bb [1.5.x] Fixed #19585 -- Fixed loading cookie value as a dict
This regression was introduced by the 'unicode_literals' patch.
Backport of f08e739bc2 from master.
2013-01-11 21:14:39 +01:00
Florian Apolloner 1d3368b587 [1.5.X] Fixed lockups in jenkins, refs #19546.
Backport of ce580dd8ea from master.
2013-01-09 23:34:33 +01:00
Claude Paroz 785ec24720 [1.5.x] Skipped deprecation warning test on Python 2.6
Refs #19546. On Python 2.6, DeprecationWarnings are visible by
default.
Backport of e6949373b from master.
2013-01-09 20:02:51 +01:00
Preston Holmes af8e858c15 [1.5.x] Fixed #19546 - ensure that deprecation warnings are shown during tests
refs #18985
2013-01-09 08:19:56 -08:00
Anssi Kääriäinen 9d6d0de7c1 [1.5.x] Fixed #17541 -- Fixed non-saved/nullable fk querying
Backpatch of 55da775ce1
2013-01-08 21:03:53 +02:00
Claude Paroz beef02eeaa [1.5.x] Updated deprecated test assertions 2013-01-08 19:11:40 +01:00
Claude Paroz 012229914c [1.5.x] Created special PostgreSQL text indexes when unique is True
Refs #19441.
Backport of c698c55966 from master.
2013-01-07 21:02:02 +01:00
Claude Paroz 96301d21bb [1.5.x] Fixed #19192 -- Allowed running tests with dummy db backend
Thanks Simon Charette for the initial patch, and Jan Bednařík for
his work on the ticket.
Backport of b740da3504 from master.
2013-01-04 14:03:55 +01:00
Claude Paroz 5b8c0d22cc [1.5.x] Fixed #19382 -- Stopped smtp backend raising exception when already closed
Thanks Sebastian Noack for the report and the initial patch.
Backport of ffa50ca35 from master.
2013-01-03 20:45:57 +01:00
Claude Paroz 4081042ef5 [1.5.x] Fixed #19134 -- Allowed closing smtp backend when the server is stopped
Thanks Sebastian Noack for the report and the initial patch.
Backport of 1b3f832ab7 from master.
2013-01-03 20:45:29 +01:00
Simon Charette 70cc95d1cc [1.5.x] Fixed #19545 -- Make sure media/is_multipart work with empty formsets
Backport of 3fc43c964e from master.
2013-01-03 15:17:14 +01:00
Aymeric Augustin 7be9fa224c [1.5.x] Minor fixes in the known_related_objects tests.
* Fixed JSON indentation.
* Avoided relying on implicit ordering.

Backport of a7b7efe.
2013-01-02 22:22:51 +01:00
Aymeric Augustin 056ace0f39 [1.5.x] Fixed #19547 -- Caching of related instances.
When &'ing or |'ing querysets, wrong values could be cached, and crashes
could happen.

Thanks Marc Tamlyn for figuring out the problem and writing the patch.

Backport of 07fbc6a.
2013-01-02 22:22:14 +01:00
Aymeric Augustin 56e5472766 [1.5.x] Fixed #19519 again -- Regression in LiveServerTestCase after fd1279a4.
Backport of 328f5b5.
2013-01-01 10:14:24 +01:00
Julien Phalip dfd8623de4 [1.5.x] Fixed #19453 -- Ensured that the decorated function's arguments are obfuscated in the @sensitive_variables decorator's frame, in case the variables associated with those arguments were meant to be obfuscated from the decorated function's frame.
Thanks to vzima for the report.
Backport of 9180146d21
2012-12-31 09:51:13 -08:00
Aymeric Augustin fd1279a44d [1.5.x] Fixed #19519 -- Fired request_finished in the WSGI iterable's close().
Backport of acc5396.
2012-12-31 12:49:10 +01:00
Claude Paroz 814c3b2e2a [1.5.x] Fixed #19537 -- Made CheckboxInput._has_changed handle 'False' string
Thanks dibrovsd@gmail.com for the report.
Backport of d11038acb2 from master.
2012-12-31 10:24:48 +01:00
Julien Phalip fa71536129 [1.5.x] Added further flexibility to ModelAdmin for controlling post-save redirections.
Refs #19505.
Backport of cee40c7d79
2012-12-30 23:11:58 -08:00
Anssi Kääriäinen d529d413f7 [1.5.x] Avoided having an indexed TextField installed unless using postgres
An index on TextField results in a warning message when running tests
on MySQL or SQLite, and the test using the TextField was PostgreSQL
only in any case.

Backpatch of 13a2b11425
2012-12-29 16:38:32 +02:00
Anssi Kääriäinen 2d74a5fd65 [1.5.x] Fixed autopk issue in tests
Backpatch of ba4331f177
2012-12-29 16:37:57 +02:00
Aymeric Augustin 5097d3c5fa [1.5.x] Fix #19524 -- Incorrect caching of parents of unsaved model instances.
Thanks qcwxezdas for the report. Refs #13839.

Backport of e9c24be.
2012-12-28 23:35:08 +01:00
Aymeric Augustin 3cb87ec605 [1.5.x] Fixed #19525 -- Reverted dcd4383107 and 05d333ba3b.
Refs #9893, #18515.

Thanks Russell for the report.

Backport of db278c3 from master.
2012-12-27 09:43:41 +01:00
Ramiro Morales 3b32e5cc2d [1.5.x] Expanded tests added when fixing #14529.
To make sure changes in 35d1cd0 don't break anything. Refs #19505.

ad769efa85 from master.
2012-12-24 18:13:38 -03:00
Julien Phalip 3ad34c231b [1.5.x] Fixed #19505 -- A more flexible implementation for customizable admin redirect urls.
Work by Julien Phalip.

Refs #8001, #18310, #19505. See also 0b908b92a2.

35d1cd0b28 from master.
2012-12-24 18:12:13 -03:00
Aymeric Augustin cd914175c8 [1.5.x] Prevented caching of streaming responses.
The test introduced in 4b278131 accidentally passed because of a
limitation of Python < 3.3.

Refs #17758, #7581.

Backport of 1c8be95 from master.
2012-12-24 20:30:20 +01:00
Aymeric Augustin 1114d8203e [1.5.x] Fixed a randomly failing test under Python 3.
Refs #17758.

Backport of e8f07f0 from master.
2012-12-24 11:26:38 +01:00
Luke Plant 00aea69f06 [1.5.x] Fixed a dependence on set-ordering in tests
Backport of 1ae64e96c1 from master
2012-12-24 02:21:19 +00:00
Luke Plant b362a55969 [1.5.x] Made admin generated changelist URLs independent of dict ordering
Backport of c31c2c92b8 from master
2012-12-24 02:20:32 +00:00
Ian Clelland cade3405c0 [1.5.x] Don't rely on dictionary ordering in tests
Backport of b9fc70141a from master
2012-12-24 02:19:53 +00:00
Ian Clelland 95b4f34b5e [1.5.x] Use HTML parser to compare html snippets
Backport of 585aa11d23 from master
2012-12-24 02:19:31 +00:00
Ian Clelland 515cf94b60 [1.5.x] Use new TestCase methods for equality comparisons
Backport of 8d35fd4c32 from master
2012-12-24 02:19:16 +00:00
Aymeric Augustin 9919638137 [1.5.x] Fixed #19468 -- Decoded request.path correctly on Python 3.
Thanks aliva for the report and claudep for the feedback.

Backport of 1e4a27d from master.
2012-12-22 14:45:06 +01:00
Russell Keith-Magee b7607003a5 [1.5.x] Fixed #19401 -- Ensure that swappable model references are case insensitive.
This is necessary because get_model() checks are case insensitive, and if the swapable check isn't, the
swappable logic gets tied up in knots with models that are partially swapped out.

Thanks to chris@cogdon.org for the report and extensive analysis, and Preston for his work on the draft patch.

Backport of c04c03d from trunk.
2012-12-20 16:14:10 +08:00
Patryk Zawadzki 9892919b0d [1.5.x] Fixed #18172 -- Made models with __iter__ usable in ModelMultipleChoiceField
Thanks to Patryk Zawadzki for the patch.

Backpatch of 3989ce52ef
2012-12-19 22:56:19 +02:00
Claude Paroz ddea0e0d7e [1.5.x] Fixed #19441 -- Created PostgreSQL varchar index when unique=True
Thanks Dylan Verheul for the report and Anssi Kääriäinen for the
review.
Backport of 55972ee5c from master.
2012-12-18 10:04:47 +01:00
Claude Paroz 0bbc7c2b49 [1.5.x] Fixed #19483 -- Improved import error message in contrib.comments
Thanks Valentin Lorentz for the report and the suggested fix.
Backport of ed711c4bd from master.
2012-12-16 21:13:30 +01:00
Russell Keith-Magee 06b5f5fcb6 [1.5.X] Corrected tests depending on the error message on the AuthenticationForm.
Refs #19368, and the fix introduced in 27f8129d64.

Backport of 9facca28b6 from trunk.
2012-12-16 07:22:25 +08:00
Claude Paroz c20c3a20a3 [1.5.x] Fixed #19432 -- Provided better error message for get_object_or_404
Thanks Kit Sunde for the report and Brian Holdefehr for the initial
patch.
Backport of 6ed6a18a0 from master.
2012-12-12 22:05:49 +01:00
Florian Apolloner deb205b8ce [1.5.X] Fixed an order dependant test failure.
Backport of 7e97f4f510 from master.
2012-12-11 16:26:53 +01:00
Florian Apolloner 919fbe08c9 [1.5.X] Fixed a test failure in the comment tests.
Backport of 1eb0da1c5b from master.
2012-12-10 23:36:17 +01:00
Florian Apolloner 77b06e4151 [1.5.X] Fixed a security issue in get_host.
Full disclosure and new release forthcoming.
2012-12-10 22:13:28 +01:00
Florian Apolloner fce1fa0f7f [1.5.X] Fixed #18856 -- Ensured that redirects can't be poisoned by malicious users. 2012-12-10 22:13:28 +01:00
Claude Paroz 984cf8417b [1.5.x] Amended an SQL test fixture to not include an id value
Some backends might need special handling for auto-increment values.
This was introduced in 5fa5621f57. Thanks Michael Manfre for spotting
the issue.
Backport of 0cdfa76e68 from master.
2012-12-10 17:50:37 +01:00
Aymeric Augustin d6bad2e9ea [1.5.x] Fixed #19392 -- Improved error for old-style url tags with dashes.
Thanks dloewenherz for the report.

Backport of 4951932 from master.
2012-12-09 16:18:52 +01:00
Claude Paroz fce779475e [1.5.x] Removed US localflavor-specific tests from core
Also fixes #9045.
Backport of 8248d1402 from master.
2012-12-08 21:08:37 +01:00
Claude Paroz fa54604606 [1.5.x] Fixed #19423 -- Prevented ModelAdmin sharing widgets due to formfield_overrides
Thanks joebuyer at manycycles.com for the report and Simon Charette
for the review.
Backport of 04e6542b5 from master.
2012-12-08 12:47:33 +01:00
Claude Paroz 4214a22e06 [1.5.x] Fixed #19357 -- Allow non-ASCII chars in filesystem paths
Thanks kujiu for the report and Aymeric Augustin for the review.
Backport of c91667338 from master.
2012-12-08 11:16:03 +01:00
Andreas Hug 67bddc0b7b [1.5.x] Fixed #18574 -- Make BaseFormSet.is_valid call its underlying forms' is_valid
Thanks Simon Charette for the report and the initial patch.
Backport of 66dfcc10b from master.
2012-12-06 20:05:16 +01:00
Claude Paroz e9301ae451 [1.5.x] Fixed #19367 -- Fixed saving ContentFile in filesystem storage
This was not working properly when ContentFile was initialized with
an unicode string.
Thanks Alexey Boriskin for the report and the test.

Backport of 34dcf51e06 from master.
2012-12-06 17:19:35 +01:00
Marc Aymerich 57a41d985a [1.5.x] Fixed #19429 -- Applied linebreaksbr to read-only fields in inlines
Applied to inlines what ec9d6b1122 did for main fieldsets.
Backport of 553838a28 from master.
2012-12-06 09:54:47 +01:00
Ramiro Morales 6a098aa6f2 [1.5.x] Fixed #18697 -- Made values accepted for two customizable admin templates consistent.
Thanks and at cloverfastfood dot com for the report.

b64d30405a from master.
2012-12-04 19:53:52 -03:00
Anssi Kääriäinen 8c099ec3ec [1.5.x] Fixed #19391 -- Oracle specific failure in tests
The failure was caused by using None as a choice for a CharField. To
avoid Oracle's "" <-> NULL handling the field type was changed to
IntegerField.

Backpatch of 632cf32b43
2012-12-04 23:00:17 +02:00
Julien Phalip db455d6ff9 [1.5.x] Fixed the admin_filters tests for Postgres.
Backport of c196e01100
2012-12-04 10:39:49 -08:00
Claude Paroz 7fea7cf5d7 [1.5.x] Fixed #19378 -- Ensured get_success_url returns a non-lazy URL
Backport of 795ac7deda from master.
2012-12-04 13:24:04 +01:00
Sebastián Magrí 237a404d3e [1.5.x] Fixed #19318 -- Ensured that the admin's SimpleListFilter options can be displayed as selected even if the lookup's first element is not a string.
Backport of 88e1715639
2012-12-03 11:55:33 -08:00
Claude Paroz 3d62eaea69 [1.5.x] Fixed #19416 -- Fixed multi-line commands in initial SQL files
Thanks Aymeric Augustin for detecting this regression.
Backport of 5fa5621f5 from master.
2012-12-03 20:49:28 +01:00
Aymeric Augustin c9a47fb379 [1.5.x] Fixed #19397 -- Crash on binary files in project templates.
Thanks gw 2012 at tnode com for the report.

Backport of baae4b8.
2012-12-03 10:45:42 +01:00
Claude Paroz 1b93499849 [1.5.x] Fixed #19015 -- Add ISO input formats to all formats
Backport of 349c4c37f8 from master.
2012-12-01 15:43:38 +01:00
Claude Paroz 47c5b50d34 [1.5.x] Fixed #19354 -- Do not assume usermodel.pk == usermodel.id
Thanks markteisman at hotmail.com for the report.
Backport of 0eeae1505 from master.
2012-11-29 21:52:22 +01:00
Anssi Kääriäinen 957de74ebe [1.5.x] Converted a couple of assertEquals -> assertEqual 2012-11-28 23:55:47 +02:00
Tai Lee a21e8dee76 [1.5.x] Fixed #14694 -- Made ``defer()`` work with reverse relations
Reverse o2o fields are now usable with defer.

Backpatch of [6ebf115206]
2012-11-28 18:25:34 +02:00
Danilo Bargen 5509eb8626 [1.5.x] Fixed #19370 -- Made date filter properly handle midnight value
Backport of c10aaa70a from master.
2012-11-27 21:25:21 +01:00
Aymeric Augustin 71e5ad248e [1.5.x] Fixed #19362 -- Detected invalid use of @python_2_unicode_compatible.
Thanks m3wolf for the report and akaariai for reproducing the problem.

Backport of 2ea80b9.
2012-11-27 09:55:26 +01:00
Edward Tjörnhammar 7c91b67cfa [1.5.x] Fixed #17911 -- Ensure that admin readonly fields' display values are shown in change forms when the raw value is None.
Backport of 29d59a879e
2012-11-25 23:16:44 +01:00
Julien Phalip 22ca5bab95 [1.5.x] Fixed #17646 -- Added a get_list_filter() method to ModelAdmin. Thanks to rasca for the suggestion and to mateusgondim for the patch.
Backport of ae206d78f6
2012-11-25 20:43:18 +01:00
Claude Paroz 02ab5d180e [1.5.x] Fixed test failure following capitalization fix in 2f035a972
Backport of f26b956e80 from master.
2012-11-25 19:55:23 +01:00
Aymeric Augustin 37c54c27bd [1.5.x] Change exception type to reduce confusion.
TemplateSyntaxError is expected at compile time, not at run time.

Refs #19280.

Backport of 7644800.
2012-11-25 19:53:50 +01:00
Aymeric Augustin 72231610b3 [1.5.x] Fixed two typos.
Backport of f89901d from master.
2012-11-25 19:32:25 +01:00
Claude Paroz 6945f60c2b [1.5.x] Enabled SimpleTestCase to be decorated by override_settings
Refs #18417. Also fixed some test case classes which subclassed
the wrong parent.
Backport of a5d47415f from master.
2012-11-25 19:08:51 +01:00
Claude Paroz 4389b51fab [1.5.x] Fixed #18417 -- Raised exception when unittest.TestCase is decorated with override_settings
Backport of 9f7cefd5 from master.
2012-11-25 19:08:27 +01:00
Aymeric Augustin 8c2f36260e [1.5.x] Fixed #19280 -- Raised an explicit exception for the old {% url %} syntax.
Backport of 6b8a7ce.
2012-11-24 22:05:41 +01:00
Aymeric Augustin f1afd57a32 [1.5.x] Used a django.test.TestCase for compatibility with @override_settings.
These tests were silently skipped.

Backport of 95edeab.
2012-11-24 22:05:25 +01:00
Anssi Kääriäinen 0d3ec8d0fb [1.5.x] Fixed ordering-related failure in m2m_through_regress tests
Backpatch of dc569c8801
2012-11-24 16:05:30 +02:00
Chris Khoo 9efe1a7210 [1.5.x] Fixed #19237 -- Improved strip_tags utility
The previous pattern didn't properly addressed cases where '>'
was present inside quoted tag content.
Backport of bf1871d87 from master.
2012-11-24 12:20:41 +01:00
Russell Keith-Magee 2ecf3a9344 [1.5.x] Simplified the deletions performed by the swappable_models test.
This is required to allow the test to run without error under SQLite in the CI environment.

Backport of 18d7c1e.
2012-11-24 15:08:28 +08:00
Russell Keith-Magee 3fd8458fb3 [1.5.x] Fixed #19806 -- Ensure that content types and permissions aren't created for swapped models.
Thanks to rizumu for the report.

Backport of c8985a8a73.
2012-11-24 14:26:50 +08:00
Anssi Kääriäinen 421e599ad3 [1.5.x] Fixed #19351 -- SQLite bulk_insert of more than 500 single-field objs
Backpatch of 0a0a0d66b3
2012-11-24 01:20:22 +02:00
Anssi Kääriäinen 625dc3f072 [1.5.x] Fixed SQLite's collapsing of same-valued instances in bulk_create
SQLite used INSERT INTO tbl SELECT %s UNION SELECT %s, the problem
was that there should have been UNION ALL instead of UNION.

Refs #19351

Backpatch of a27582484c
2012-11-24 01:19:17 +02:00
Anssi Kääriäinen 90c7aa0740 [1.5.x] Fixed #18375 -- Removed dict-ordering dependency for F-expressions
F() expressions reuse joins like any lookup in a .filter() call -
reuse multijoins generated in the same .filter() call else generate
new joins. Also, lookups can now reuse joins generated by F().

This change is backwards incompatible, but it is required to prevent
dict randomization from generating different queries depending on
.filter() kwarg ordering. The new way is also more consistent in how
joins are reused.

Backpatch of 90b86291d0
2012-11-23 20:07:50 +02:00
Aymeric Augustin a892cd3191 [1.5.x] Tweak a test to avoid hitting a limit with SQLite.
Django cannot delete more than 999 objects at a time with SQLite.

Refs #16426, #16039.

Backport of 2875b5d from master.
2012-11-23 10:19:09 +01:00