Commit Graph

4106 Commits

Author SHA1 Message Date
Honza Kral 4ad1eb1c14 Fixed #12674 -- provide a way to override admin validation
Moved admin validation code to classes and have those be class
attributes to the ModelAdmin classes.
2013-05-19 12:42:52 +02:00
Łukasz Langa e80636b668 Added TransRealMixin to fix i18n global state pollution in the test suite 2013-05-19 12:05:57 +02:00
Andrea Crotti 5124ab7620 add comment to explain why it's necessary to do an explicit check for
Python2 and how metaclasses are defined
2013-05-19 10:36:04 +02:00
Marc Tamlyn c70ca4879e Merge pull request #1116 from elektrrrus/ticket_20234_20236
Ticket 20234 20236
2013-05-19 01:32:41 -07:00
Emil Stenström 7d77e9786a Fixed #20246 -- Added non-breaking spaces between values an units 2013-05-18 23:01:48 +02:00
Tome Cvitan caf56ad174 Fixed #20440 -- Ensured CharField's max_length/min_length are integers 2013-05-18 22:30:24 +02:00
Karol Sikora 3eba8c7f7f Fixed #20234 and #20236 -- SingleObjectMixin fixes
Added object on SingleObjectMixin returned context,
some code clanup.
2013-05-18 21:13:27 +02:00
Aymeric Augustin 0038296135 Fixed ff881aef on Python 3. 2013-05-18 20:48:47 +02:00
Shai Berger ff881aef53 Fixed #13958 -- problem reporting exception from \r-line-ended file
Thanks petrvanblokland for reporting and saz for the patch
2013-05-18 19:30:03 +03:00
Łukasz Langa f763227c7d Fixes a Python 3.x regression introduced in a19e9d80 2013-05-18 18:06:31 +02:00
Florian Apolloner dc8814bf7d Merge branch 'master' of github.com:django/django 2013-05-18 17:39:14 +02:00
Łukasz Langa bd97f7d0cb Fixed #15201: Marked CACHE_MIDDLEWARE_ANONYMOUS_ONLY as deprecated 2013-05-18 17:38:32 +02:00
Florian Apolloner acd0bb39df Fixed #14894 -- Ensure that activating a translation doesn't run into threading issues.
Thanks to maxbublis for the report and sergeykolosov for the patch.
2013-05-18 17:36:31 +02:00
Donald Stufft 398841d6d3 Merge branch 'allow-any-iterable-for-choices' 2013-05-18 11:31:16 -04:00
Donald Stufft a19e9d80ff Fixed #20430 - Enable iterable of iterables for model choices
Allows for any iterable, not just lists or tuples, to be used as
the inner item for a list of choices in a model.
2013-05-18 11:14:05 -04:00
Aymeric Augustin e73cb6391d Merge pull request #1122 from ambv/issue13285
Fixed #13285: populate_xheaders breaks caching
2013-05-18 08:05:48 -07:00
Łukasz Langa 64e11a68f1 Fixed #13285: populate_xheaders breaks caching 2013-05-18 17:03:43 +02:00
Aymeric Augustin 3634948c88 Moved IgnorePendingDeprecationWarningsMixin in django.test.utils.
This mixin is useful whenever deprecating a large part of Django.
2013-05-18 16:49:15 +02:00
Olivier Sels 63a9555d57 Fixed #19436 -- Don't log warnings in ensure_csrf_cookie. 2013-05-18 16:17:46 +02:00
Aymeric Augustin 7d050e8e9c Merge pull request #1113 from denibertovic/master
Fixed #18761 -- Added whitespace stripping to URLField and SlugField.
2013-05-18 07:11:11 -07:00
Deni Bertovic 186ec21a3d Added stripping of whitespace for SlugField and URLField 2013-05-18 16:06:08 +02:00
Jacob Burch 89955cc35f Fixed #9595 -- Allow non-expiring cache timeouts.
Also, streamline the use of 0 and None between cache backends.
2013-05-18 15:39:42 +02:00
Łukasz Langa 92ebb29c53 Fixes #19919: get_language_from_request() disregards "en-us" and "en" languages
when matching Accept-Language
2013-05-18 14:37:04 +02:00
Florian Apolloner 16683f29ea Merge pull request #1084 from erikr/master
Fixed #13546 -- Easier handling of localize field options in ModelForm
2013-05-18 05:15:15 -07:00
Marc Tamlyn ef73a8eefd Merge pull request #1083 from Markush2010/ticket20235
Fixes #20235 - MultipleObjectMixin requires object_list in kwargs
2013-05-18 05:14:28 -07:00
Erik Romijn 756b81dbd1 Fixed #13546 -- Easier handling of localize field options in ModelForm 2013-05-18 14:13:00 +02:00
Matthew Somerville 1c921cfac3 Fixed #20235 -- Use self.object_list if object_list not present in get_context_data kwargs.
This is so MultipleObjectMixin can be used in the same way as
SingleObjectMixin.
2013-05-18 14:10:40 +02:00
Aymeric Augustin 4bed64c417 Made test introduced in 566e284c pass on Python 3. 2013-05-18 13:34:52 +02:00
Senko Rasic 566e284c56 Added test for multipart, non form-data POST.
Closes #9054. The bug itself is no longer present.
2013-05-18 12:50:28 +02:00
Claude Paroz 8fd44b2551 Fixed #20356 -- Prevented crash when HTTP_REFERER contains non-ascii
Thanks srusskih for the report and Aymeric Augustin for the review.
2013-05-18 12:39:11 +02:00
Florian Apolloner 051cb1f4c6 Fixed #20411 -- Don't let invalid referers blow up CSRF same origin checks.
Thanks to edevil for the report and saz for the patch.
2013-05-18 12:32:47 +02:00
Baptiste Mispelon 9012a9e200 Fixed #20422 -- Applied makemessage's --ignore patterns to full path
Fix makemessage's --ignore patterns being applied to the full path
instead of the file name. Thanks to nnseva for the report and the
original patch.
2013-05-18 10:40:16 +02:00
Shai Berger 9ef4d177d1 Fixed #20388 -- Test failures under Oracle.
Add "FROM DUAL" to SQL selecting constants in tests for Oracle.
2013-05-16 15:00:16 +02:00
Daniel Lindsley 33793f7c3e Fixed #19934 - Use of Pillow is now preferred over PIL.
This starts the deprecation period for PIL (support to end in 1.8).
2013-05-14 19:32:04 -07:00
Florian Apolloner e23a5f9a47 Fixed a regression in the test runner loading of runtests.py.
Refs #17365, #17366, #18727.
2013-05-11 15:47:40 +02:00
Carl Meyer 9012833af8 Fixed #17365, #17366, #18727 -- Switched to discovery test runner.
Thanks to Preston Timmons for the bulk of the work on the patch, especially
updating Django's own test suite to comply with the requirements of the new
runner. Thanks also to Jannis Leidel and Mahdi Yusuf for earlier work on the
patch and the discovery runner.

Refs #11077, #17032, and #18670.
2013-05-10 23:08:45 -04:00
Anssi Kääriäinen c0d8932a6d Fixed #19939 -- generic relations + split_exclude regression
Added a test, the issue was already fixed (likely by the patch
for #19385).
2013-05-11 03:48:58 +03:00
Alex Gaynor 327e362ff3 Fixed an obvious typo. 2013-05-10 08:56:39 -07:00
Aymeric Augustin a4dec43b52 Fixed two admin_views tests under Oracle.
Thanks Anssi for the review.
2013-05-10 16:56:42 +02:00
Aymeric Augustin 9a3708cec8 Fixed a test that fails under Python 3. 2013-05-09 19:33:02 +02:00
Luke Plant f026a519ae Fixed #19733 - deprecated ModelForms without 'fields' or 'exclude', and added '__all__' shortcut
This also updates all dependent functionality, including modelform_factory
 and modelformset_factory, and the generic views `ModelFormMixin`,
 `CreateView` and `UpdateView` which gain a new `fields` attribute.
2013-05-09 16:44:36 +01:00
Luke Plant 1e37cb37ce Further removal of static admin validation that can fail erroneously 2013-05-09 16:44:36 +01:00
Alex Gaynor 6634cb7b53 Removed a test that didn't make sense; code could never be called the way the test was written. 2013-05-09 06:55:25 -07:00
Luke Plant 2f8f2ad1d7 Removed some failing tests missed in 1556b1c3b7 2013-05-09 01:45:34 +01:00
Luke Plant 1556b1c3b7 Removed fragile admin validation of fields on ModelForm
Refs #19445
2013-05-09 00:49:05 +01:00
Aymeric Augustin 832b4a5722 Marked a test as an expected failure on MySQL and Python 3.2.
This test hits a bug in current ports of MySQLdb.
2013-05-08 23:12:46 +02:00
Aymeric Augustin 7476d96f83 Marked tests of BinaryFields as expected failures on MySQL and Python 3.
Current ports of MySQLdb are very buggy in this area.
2013-05-08 15:48:39 +02:00
Tai Lee 99a6f0e77c Fixed #20354 -- `makemessages` no longer crashes with `UnicodeDecodeError`
Handle the `UnicodeDecodeError` exception, send a warning to `stdout` with the
file name and location, and continue processing other files.
2013-05-07 21:22:05 +02:00
Florian Apolloner da85c8cf32 Fixed a regression introduced in 9f7a01ef2b. 2013-05-05 15:27:14 +02:00
Florian Apolloner 780fa48f5f Fixed test failures introduced in a5becad909. 2013-05-01 16:40:49 +02:00