Commit Graph

9060 Commits

Author SHA1 Message Date
Wiktor Kolodziej cec9558fba Fixed #17308 -- Enabled the use of short_description on properties in the admin. 2013-05-21 13:19:18 +02:00
Aymeric Augustin 18856f866c Merge pull request #1191 from ambv/content_is_bytes
Fixed #20472: response.content should be bytes on both Python 2 and 3
2013-05-21 01:26:35 -07:00
Daniel Lindsley e24d486fbc Fixed #20212 - __reduce__ should only be defined for Py3+. 2013-05-21 00:49:21 -07:00
Łukasz Langa 0594fed9ff Fixed #20472: response.content should be bytes on both Python 2 and 3 2013-05-21 01:28:16 +02:00
Ramiro Morales 4ba1c2e785 Fixed #9321 -- Deprecated hard-coding of help text in model ManyToManyField fields.
This is backward incompatible for custom form field/widgets that rely
on the hard-coded 'Hold down "Control", or "Command" on a Mac, to select
more than one.' sentence.

Application that use standard model form fields and widgets aren't
affected but need to start handling these help texts by themselves
before Django 1.8.

For more details, see the related release notes and deprecation timeline
sections added with this commit.
2013-05-20 16:29:51 -03:00
Jorge Bastida 888c86dcf3 Fixed #20445 -- Raised original exception after command error 2013-05-20 18:59:37 +02:00
Ryan Kaskel 4280217f31 Fixed #20403 -- Ignore forms marked for deletion when validating max_num. 2013-05-20 12:13:21 -04:00
Anssi Kääriäinen 266c0bb23e Fixed #20278 -- ensured .get() exceptions do not recurse infinitely
A regression caused by d5b93d3281 made .get() error
reporting recurse infinitely on certain rare conditions. Fixed this by
not trying to print the given lookup kwargs.
2013-05-20 18:50:40 +03:00
Anssi Kääriäinen c9a96075fa Fixed #20378 -- regression in GenericRelation on abstract model
When a GenericRelation was defined on abstract model, queries on childs
of the abstract model didn't work. The problem was in the way fields and
in particular field.rel was copied from models to their children.

The regression was likely caused by #19385. Thanks to Gavin Wahl for
spotting the regression.
2013-05-20 18:02:10 +03:00
Anssi Kääriäinen f53059b411 Fixed qs.values() regression when used in subquery 2013-05-20 15:38:47 +03:00
Marc Tamlyn 6d81d5d82e Merge pull request #1181 from aaugustin/better-api-to-disable-atomic-requests
Changed API to disable ATOMIC_REQUESTS per view.
2013-05-20 00:26:06 -07:00
Aymeric Augustin 6633eeb886 Changed API to disable ATOMIC_REQUESTS per view.
A decorator is easier to apply to CBVs. Backwards compatibility isn't an
issue here, except for people running on a recent clone of master.

Fixed a few minor problems in the transactions docs while I was there.
2013-05-19 19:53:16 +02:00
Preston Holmes 6786920fd8 Fixed #16330 -- added --pks option in dumpdata command
Thanks to guettli for the initial ticket and patch, with additional work
from mehmetakyuz and Kevin Brolly.
2013-05-19 09:10:40 -07:00
Aymeric Augustin f7d7d2be4b Made 2d309a70 compatible with Python 3. 2013-05-19 17:58:29 +02:00
Russell Keith-Magee a4ab0e8b86 Merge pull request #1178 from bmispelon/master
Fix for test failure introduced by 980ae2a.
2013-05-19 08:08:09 -07:00
Baptiste Mispelon 3cb1e9b93c Fix test failure introduced by 980ae2ab29. 2013-05-19 16:51:36 +02:00
Bozidar Benko 2d309a7043 Fixed #15961 -- Modified ModelAdmin to allow for custom search methods.
This adds a get_search_results method that users can override to
provide custom search strategies.

Thanks to Daniele Procida for help with the docs.
2013-05-19 16:45:00 +02:00
Erik Romijn f88700d610 Fix #19664 -- Illegal Characters In Session Key Give Fatal Error On File Backend Only 2013-05-19 15:33:05 +02:00
Aymeric Augustin 181f2ec603 Fixed test failures with Oracle when pytz isn't installed.
Thanks Shai Berger for the report.
2013-05-19 14:38:48 +02:00
Baptiste Mispelon 980ae2ab29 Fix #20447: URL names given to contrib.auth.views are now resolved.
This commit also adds tests for the redirect feature of most auth views.
It also cleans up the tests, most notably using @override_settings instead
of ad-hoc setUp/tearDown methods.

Thanks to caumons for the report.

Conflicts:
	docs/releases/1.6.txt
2013-05-19 14:36:38 +02:00
Andrew Godwin 9b22baddef Merge pull request #1130 from vdboor/issue_20442_get_for_id
Fixed #20442: NoneType error when fetching a stale ContentType with get_for_id
2013-05-19 05:33:17 -07:00
Aymeric Augustin f7467181aa Merge pull request #1160 from erikr/host-inet-postgres2
Fixed #11442 -- Postgresql backend casts all inet types to text
2013-05-19 04:57:10 -07:00
Erik Romijn 60d94c2a80 Fixed #11442 -- Postgresql backend casts all inet types to text 2013-05-19 13:28:09 +02:00
Łukasz Langa 660762681c Fixed #20126 -- XViewMiddleware moved to django.contrib.admindocs.middleware 2013-05-19 13:18:35 +02:00
Aymeric Augustin a7e2835276 Merge pull request #1028 from manfre/patch-2
Fixed #20340 - document required return value for disable_constraint_checking
2013-05-19 04:17:08 -07:00
Aymeric Augustin cb86f707a0 Fixed #12747 -- Made reason phrases customizable. 2013-05-19 13:14:54 +02:00
Aymeric Augustin 3129d19071 Merge pull request #1152 from ambv/issue11915
Fixed #11915: generic Accept-Language matches country-specific variants
2013-05-19 04:01:20 -07:00
Andrew Godwin 04e0fc029f Merge pull request #1094 from senko/ticket_11160
Fixed #11160: Formset non_form_errors returns ErrorList() if is_valid is not called
2013-05-19 03:56:14 -07:00
Andrew Godwin 7a99d1e167 Merge pull request #1134 from senko/ticket_18990
Fixed #18990: Loaddata now complains if fixture doesn't exist
2013-05-19 03:54:29 -07:00
Łukasz Langa 26e3e7ecb5 Fixed #11915: generic Accept-Language matches country-specific variants 2013-05-19 12:50:09 +02:00
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
Senko Rasic c44a2c40fe Fixed #18990 -- Loaddata now complains if fixture doesn't exist
If the fixture doesn't exist, loaddata will output a warning.

The fixture named "initial_data" is exceptional though; if it
doesn't exist, the warning is not emitted. This allows syncdb and
flush management commands to attempt to load it without causing
spurious warnings.

Thanks to Derega, ptone, dirigeant and d1ffuz0r for contributions
to the ticket.
2013-05-19 11:31:27 +02:00
Marc Tamlyn 413735b239 Fix a typo in a comment. 2013-05-19 11:24:36 +02:00
Andrew Godwin 2d0e36ae37 Merge pull request #1142 from Pike/master
Fixed #20454: Make Urdu (ur) recognized as RTL language
2013-05-19 02:23:20 -07:00
Senko Rasic cc3b3ba93a Fixed #18990: Loaddata now complains if fixture doesn't exist
The fixture named "initial_data" is exceptional though; if it
doesn't exist, the error is not raised. This allows syncdb and
flush management commands to attempt to load it without causing
an error if it doesn't exist.
2013-05-19 10:56:09 +02:00
Marc Tamlyn 6fef4be632 Merge pull request #1141 from inglesp/typo
Typo in comment
2013-05-19 01:39:09 -07:00
Marc Tamlyn c70ca4879e Merge pull request #1116 from elektrrrus/ticket_20234_20236
Ticket 20234 20236
2013-05-19 01:32:41 -07:00
Axel Hecht 004fde0702 Make Urdu (ur) recognized as RTL language. Refs #20454 2013-05-19 11:29:24 +03:00
Peter Inglesby cafcc22b01 Typo in comment 2013-05-19 09:28:36 +02:00
Ramiro Morales 0a50311063 Fixed #20004 -- Moved non DB-related assertions to SimpleTestCase.
Thanks zalew for the suggestion and work on a patch.

Also updated, tweaked and fixed testing documentation.
2013-05-18 19:04:34 -03:00
Claude Paroz 69523c1ba3 Updated contrib.humanize translation template 2013-05-18 23:11:39 +02: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
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
Aymeric Augustin 5915800deb Merge pull request #1127 from filias/20142
Fixed #20142 -- Added error handling for fixture setup
2013-05-18 08:42:36 -07: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
Diederik van der Boor 86e761fee8 Fix NoneType error when fetching a stale ContentType with get_for_id
When a stale ContentType is fetched, the _add_to_cache() function
didn't detect that `model_class()` returns `None` (which it does by
design). However, the `app_label` + `model` fields can be used instead
to as local cache key. Third party apps can detect stale models by
checking whether `model_class()` returns `None`.

Ticket: https://code.djangoproject.com/ticket/20442
2013-05-18 17:31:28 +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
Filipa Andrade 5883ae56b3 Fixed #20142 -- Added error handling for fixture setup
TestCase._fixture_setup disables transactions so,
in case of an error, cleanup is needed to re-enable
transactions, otherwise following TransactionTestCase
would fail.
2013-05-18 17:05:45 +02: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
Claude Paroz 710c59bf9b Slightly reworked imports in contrib.auth.__init__ 2013-05-18 16:01:47 +02:00
Jorge Bastida dc43fbc2f2 Fixed #18998 - Prevented session crash when auth backend removed
Removing a backend configured in AUTHENTICATION_BACKENDS should not
raise an exception for existing sessions, but should make already
logged-in users disconnect.
Thanks Bradley Ayers for the report.
2013-05-18 15:58:29 +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
Florian Apolloner e0df647143 Merge pull request #1101 from erikr/master
Fixed argument order for localized_fields to ensure backwards compatibility
2013-05-18 05:53:14 -07:00
Erik Romijn 1c1695668f Fixed argument order for localized_fields to ensure backwards compatibility 2013-05-18 14:38:45 +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
Senko Rasic 493aca453a Fixed #11160 - Ensure full_clean is called from non_form_errors
Updated FormSet.non_form_errors() to ensure full_clean() has
been called before returning the errors.
2013-05-18 13:44:27 +02:00
Aymeric Augustin 06603d112c Merge pull request #1090 from zyegfryed/ticket_20433
Fixed #20433: extracted catalog compilation code from view.
2013-05-18 04:30:56 -07:00
zyegfryed 5e208d579d Fixed #20433: Extract catalog compilation code from javascript_catalog view. 2013-05-18 13:20:52 +02:00
Shai Berger 215647c0f7 Fixed #20386 - Introspection problem on Oracle
Made introspection always return a unicode as column name on Oracle.
Thanks aaugustin for review and suggestion to use force_text().
2013-05-18 14:19:26 +03:00
Jacob Burch 340115200f Fixed #20432 -- Test failure in admin_views.
The failure was triggered by a cache leak.
2013-05-18 13:13:33 +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
Eric Urban c278e56baf Corrected documentation on the constructor arguments of MultiPartParser 2013-05-17 19:49:33 -04:00
Claude Paroz 838f28974e Fixed #20427 -- Moved a variable initialization in storage.py
This is fixing commit 4e70ad11d2. Thanks mattias at elements.nl
for the report and Baptiste Mispelon for identifying the faulty
commit.
2013-05-17 18:31:52 +02:00
Aymeric Augustin 9c487b5974 Replaced an antiquated pattern.
Thanks Lennart Regebro for pointing it out.
2013-05-17 18:08:58 +02:00
Preston Holmes b1bfd9630e Remove unnecessary and problematic parent class from SuccessMessageMixin
refs #16319, thanks to bmispelon for the catch
2013-05-17 08:59:06 -07:00
Claude Paroz b16b72d415 Fixed #5472 --Added OpenLayers-based widgets in contrib.gis
Largely inspired from django-floppyforms. Designed to not depend
on OpenLayers at code level.
2013-05-17 13:33:40 +02:00
Mark Huang 0732c8e8c6 Fixed #20357 -- Allow empty username field label in `AuthentificationForm`. 2013-05-16 11:41:52 -04:00
Tim Graham 79715f267c Fixed misleading heading on admindocs models page; refs #19712. 2013-05-16 08:37:20 -04:00
Claude Paroz 0a29057ebe Fixed #20415 -- Ensured srid is not localized in openlayers template
Thanks pierremarc07 at gmail.com for the report.
2013-05-16 13:48:38 +02:00
Mike Fogel 3188775174 Fix bug introduced in contrib.gis in 74f3884ae0 2013-05-15 14:07:34 -07:00
Mike Fogel 74f3884ae0 Fixed #20413 - Respect Query.get_meta() 2013-05-15 12:55:30 -07:00
Florian Apolloner ebfb71c64a Fixed previous commit. (Don't commit from DjangCon!) 2013-05-15 16:50:33 +02:00
Florian Apolloner f6d1ca56c9 Don't unregister OSMGeoAdmin, other tests rely on it. 2013-05-15 16:47:03 +02:00
Florian Apolloner 4ecc6da20b Removed unicode literals from PIL compat. 2013-05-15 09:00:09 +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
Donald Stufft 8f0a4665d6 Recommend using the bcrypt library instead of py-bcrypt
* py-bcrypt has not been updated in some time
* py-bcrypt does not support Python3
* py3k-bcrypt, a port of py-bcrypt to python3 is not compatible
  with Django
* bcrypt is supported on all versions of Python that Django
  supports
2013-05-13 23:49:00 -04:00
Tim Graham 2c62a509de Fixed #20136 - Fixed and expanded the docs for loaddata and model signals.
Thanks brandon@ and Anssi for the report.
2013-05-11 19:34:02 -04:00
Florian Apolloner a6edde3260 Fixed embarrassing typo. 2013-05-11 22:57:01 +02:00
Florian Apolloner 01820466ca Don't hardcode primary keys in gis tests. 2013-05-11 22:42:39 +02:00
Donald Stufft 11c7ec7993 Merge pull request #1052 from dstufft/bcrypt-python3
BCrypt on Python3
2013-05-11 10:53:18 -07:00
Florian Apolloner 2bf403ecbd Fixed a regression from e23a5f9a47.
Excluded postgis specific gis tests from other spatial databases.

Refs #17365, #17366, #18727.
2013-05-11 18:29:08 +02:00
Donald Stufft 3070e8f711 Properly force bytes or str for bcrypt on Python3 2013-05-11 11:16:06 -04: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
Claude Paroz 7b00d90208 [py3] Made GeoIP tests pass with Python 3 2013-05-10 13:21:07 +02:00