Commit Graph

16431 Commits

Author SHA1 Message Date
Richard Xia 5725236c3e Fixed #21355 -- try importing _imaging from PIL namespace first. 2013-11-26 18:51:39 +02:00
Baptiste Mispelon 9d6c48aeb0 Use str.isupper() to test if a string is uppercased. 2013-11-26 14:08:05 +01:00
Vajrasky Kok 16d73d7416 Fixed #21512 -- Added more complete information about Pillow and PIL in model_fields and model_forms tests. 2013-11-26 10:18:54 +01:00
Jay Leadbetter c74504c2dd Fixed #20522 - Allowed use of partially validated object in ModelAdmin.add_view formset validation.
Updated ModelAdmin to use form.instance when passing parent model to
child inlines for add_view. There is effectively no change in the
change_view since the previously passed 'obj' is the same as form.instance.

Thanks to meshy for report, and EvilDMP and timo for review.
2013-11-25 20:01:16 -05:00
Loic Bistuer 1c7a83ee8e Fixed #21489 -- Make formsets directly importable from django.forms. 2013-11-25 19:16:19 -05:00
Krzysztof Jurewicz 7a0a3a64a8 Fixed #21509 -- Removed dead exception catching code.
Since Python 2.5, KeyboardInterrupt and SystemExit are not subclasses of
Exception, so explicitly reraising them before the “except Exception” clause
is not necessary anymore.
2013-11-25 16:31:03 +01:00
Alex Gaynor 7349a22d29 flake8 fix 2013-11-25 09:21:25 -06:00
Shai Berger 3411af3cd1 Fixed #21403: Corrected test code
A test for annotations incorrectly assumed that the first instance
(in the test) of a model using AutoField for PK will always get pk=1.
The test was changed to compare against actual instance id instead.
2013-11-25 16:16:04 +02:00
Ludwik Trammer 70e61310d6 Fixed #21507 -- Corrected default widget information for FileField 2013-11-25 08:26:10 -05:00
Shai Berger de220fb85e Fixed test failure on Oracle
Failure was introduced with test in [19e5cd77f0]
2013-11-25 15:11:50 +02:00
Alex Gaynor 83ab04c6d6 flake8 fixes 2013-11-24 21:07:21 -06:00
Alex Gaynor 4e07d93325 Fixed some unnescesarily gendered language in the docs 2013-11-24 21:05:59 -06:00
Simon Charette eb38257e51 Fixed #21391 -- Allow model signals to lazily reference their senders. 2013-11-24 17:51:22 -05:00
Tim Graham 03bc0a8ac5 Fixed typo in previous commit; refs #21490. 2013-11-24 16:28:29 -05:00
Tim Graham bfe7377adb Fixed #21490 -- Fixed custom admin URL reverse example.
Thanks glarrain for the report.
2013-11-24 15:19:05 -05:00
Loic Bistuer 2a0ae9b9ec Removed confusing comments from the docs.
The settings reference documentation doesn't seem the right place to
invite users to write their own db and cache backends.

Also the actual wording makes the task sound trivial, which is hardly
the case; writing a custom db backend is a very difficult task, and
writing a custom cache backend is full of gotcha.
2013-11-24 20:22:22 +01:00
Joel Bohman 19e5cd77f0 Fixed #21497 -- Forced conversion to bytes for very long index names 2013-11-24 13:15:50 -05:00
Antonis Christofides f88e760869 Added more tests for ContentTypeManager.get_for_model. 2013-11-24 18:59:46 +01:00
Baptiste Mispelon e681b2861d Fixed #21500 -- Removed imports of deprecated utils.importlib 2013-11-24 16:45:01 +01:00
Florian Apolloner d47f794f8f Properly closed cache connections at the end of the request.
This only affects the new cache api and not the deprecated get_cache.

Refs #21012
2013-11-24 16:23:28 +01:00
Alex Gaynor 8adbfdfcc4 Fixed flake8 error (5 space identation!!!) 2013-11-24 08:33:22 -06:00
Baptiste Mispelon 17912522ce Fixed #21504 -- Don't shadow database errors when testing for postgis version.
Thanks to trac user paultag for the report.
2013-11-24 14:34:43 +01:00
Florian Apolloner 87ea38cc9e Don't fail if there is no memcached backend active. 2013-11-24 12:08:41 +01:00
Florian Apolloner 3ea65d1f68 Fixed regression from ffc37e2343.
This (hopefully) ensures that the cache are created the same way as before
the offending commit.
2013-11-24 11:51:37 +01:00
Vajrasky Kok 7169722d5c Fixed #21505 -- Added unit test for django.utils.text.get_valid_filename. 2013-11-24 11:10:34 +01:00
Florian Apolloner 101da92ebd Randomized KEY_PREFIX in caches test to prevent failures during parallel testruns. 2013-11-24 10:15:43 +01:00
Alex Gaynor ce5ad8199c Merge pull request #1980 from krallin/patch-1
Add missing commas in Prefetch docs
2013-11-23 14:51:10 -08:00
Thomas Orozco 957d22b850 Add missing commas in Prefetch docs 2013-11-23 23:48:34 +01:00
Baptiste Mispelon a739573e17 Fixed test breakage under python 3 introduced by a480f8320a. 2013-11-23 19:50:20 +01:00
Florian Apolloner 9e87444552 Don't fail if cPickle doesn't exist.
Today is not my day :(
2013-11-23 19:05:13 +01:00
Florian Apolloner cf7ddc5765 Follow up to e112654fc8
Actually comitted the code now :þ
2013-11-23 18:55:28 +01:00
Claude Paroz 42fef29446 Fixed #21486 -- Prevented settings config in signal connection
This was particularly problematic in the chain get_wsgi_application
-> db.connections import -> signal connection -> settings configuration.
Thanks Jon Dufresne for the report.
2013-11-23 18:47:47 +01:00
Florian Apolloner e112654fc8 Fixed #21200 -- Consistantly raise errors across all cache backends.
Thanks to tchaumeny for the patch.
2013-11-23 17:50:28 +01:00
Alex Gaynor 0ec712dd11 A handful of flake8 fixes 2013-11-23 08:26:11 -08:00
Denis Cornehl 1e97058417 Fixes #21412 -- Better error message for messages.add_message
Problem were users calling messages.debug/info/* with a wrong argument
and getting the error "You cannot add messages without installing
MessageMiddleware"

Thanks to trac-user merb for the report.
2013-11-23 17:11:22 +01:00
Aymeric Augustin a480f8320a Simplified iteration in HTTP response objects.
Fixed #20187 -- Allowed repeated iteration of HttpResponse.

All this became possible when support for old-style streaming responses was
finally removed.
2013-11-23 17:03:43 +01:00
Aymeric Augustin 1124e16340 Allowed running the test suite without memcached (!) 2013-11-23 16:49:14 +01:00
Ramiro Morales 62b393c5ae 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.

8750296918 from stable/1.6.x.
2013-11-23 11:53:47 -03:00
Curtis Maloney ffc37e2343 Fixed #21012 -- New API to access cache backends.
Thanks Curtis Malony and Florian Apolloner.

Squashed commit of the following:

commit 3380495e93
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Sat Nov 23 14:18:07 2013 +0100

    Looked up the template_fragments cache at runtime.

commit 905a74f52b
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Sat Nov 23 14:19:48 2013 +0100

    Removed all uses of create_cache.

    Refactored the cache tests significantly.

    Made it safe to override the CACHES setting.

commit 35e289fe92
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Sat Nov 23 12:23:57 2013 +0100

    Removed create_cache function.

commit 8e274f747a
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Sat Nov 23 12:04:52 2013 +0100

    Updated docs to describe a simplified cache backend API.

commit ee7eb0f73e
Author: Curtis Maloney <curtis@tinbrain.net>
Date:   Sat Oct 19 09:49:24 2013 +1100

    Fixed #21012 -- Thread-local caches, like databases.
2013-11-23 15:06:59 +01:00
Baptiste Mispelon 3ca0815c0b Fixed #21445 -- Clean up misuse of null in quickElement.
Thanks to trac user parsch for the report.
2013-11-23 14:40:01 +01:00
Aymeric Augustin 1d2dd3b9fa Merge pull request #1973 from haikoschol/master
Removed information about releases < 1.7.
2013-11-23 05:32:00 -08:00
Haiko Schol dfde4d9012 Removed information about releases < 1.7. 2013-11-23 13:53:50 +01:00
Loic Bistuer 033b26173b Improved docs for ModelFormSet.clean(). 2013-11-22 19:48:54 -05:00
mlissner c456ea4ec8 Noted that localmem is the default cache. 2013-11-22 19:39:25 -05:00
Tim Graham f0fc1690b4 Removed unused import in docs/topics/http/sessions.txt 2013-11-22 15:28:22 -05:00
Bouke Haarsma 18185724e6 Fixed #21443 -- Cannot show debug info on PY3's importlib
Thanks productions@zaziork.co.uk for the review.
2013-11-22 20:36:33 +01:00
Claude Paroz 47afe07324 Merge pull request #1965 from loic/ticket21491
Fixed #21491 -- Removed documented workaround for a known issue.
2013-11-22 11:24:12 -08:00
Loic Bistuer 82a58ce5b6 Fixed #21491 -- Removed documented workaround for a known issue.
The issue was that two M2M hidden reverse managers
(related_name ending with a '+') could clash with each other.

Refs #21375 and #15932. Thanks Baptiste.
2013-11-23 01:29:09 +07:00
Alex Gaynor b9d908da54 Fixed some flake8 issues 2013-11-22 09:10:18 -08:00
Aymeric Augustin 9f8810ac51 Fixed #21487 -- Session cannot store tzinfo instances anymore.
Thanks filipp for the report.

Forward-port of 1eddca0a from stable/1.6.x.
2013-11-22 15:34:37 +01:00