Commit Graph

49 Commits

Author SHA1 Message Date
Russell Keith-Magee 333615accb Fixed #11874 -- Optimizations and cleanups for SortedDict. Thanks to Alex Gaynor and Armin Ronacher for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11815 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-12 06:00:59 +00:00
Jacob Kaplan-Moss c33355d86a As long as we're micro-optomizing, do it right -- using map() shaves another dozen or so seconds off the test suite run time.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11495 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-09-10 22:49:05 +00:00
Jacob Kaplan-Moss 9d1a7c203c Micro-optomization to SortedDict.values(). Yes, it looks silly, but it shaves 30 seconds (5%) off the run time of the test suite.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11494 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-09-10 22:23:24 +00:00
Jacob Kaplan-Moss 184ea1c91f Fixed #8847, #10370: added some missing methods to MultiValueDict after [8399]. Thanks, James Turk and rfk.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10241 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-31 06:30:07 +00:00
Jacob Kaplan-Moss 9ae873fcd8 Fixed #10184: QueryDicts with multiple values can now be safely pickled. Thanks, Alex Gaynor.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10240 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-31 05:14:13 +00:00
Malcolm Tredinnick 62b39322f3 Fixed #7496 -- It's now possible to pickle SortedDicts with pickle protocol 2
(used in caching). Thanks, John Huddleston.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8531 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-25 04:00:15 +00:00
Gary Wilson Jr 2b82a3bcfc Fixed #7331 -- Made `QueryDict.iteritems` behave like `QueryDict.items`, thanks jurev.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8399 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-16 02:17:55 +00:00
Jacob Kaplan-Moss d725cc9734 Fixed #2070: refactored Django's file upload capabilities.
A description of the new features can be found in the new [http://www.djangoproject.com/documentation/upload_handing/ upload handling documentation]; the executive summary is that Django will now happily handle uploads of large files without issues.

This changes the representation of uploaded files from dictionaries to bona fide objects; see BackwardsIncompatibleChanges for details.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7814 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-01 15:10:51 +00:00
Malcolm Tredinnick 915001ad0b Fixed #7109 -- Quote certain values before passing them for substitution in
Field.db_type().

This fixes a problem with using reserved words for field names in Oracle. Only
affects Oracle at the moment, but the same changes could easily be used by
other backends if they are required (requires changing creation.py, only).

This commit also reverts [7501] so that if the fix doesn't work, it will show
up in the tests (and if it does work, the tests will prevent us from breaking
it again).


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7743 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-26 03:11:32 +00:00
Malcolm Tredinnick 54546f23f0 Fixed #6627 -- Made dict.clear() work for SortedDicts.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7140 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-21 21:27:44 +00:00
Malcolm Tredinnick e7b2ad8020 Fixed #6611 -- When copying a SortedDict, make a new copy of the keys list.
Thanks, Jeremy Dunck.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7129 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-18 23:08:51 +00:00
Adrian Holovaty 8b3f36029f Made a bunch of small doc rewordings from changes over the past couple of weeks
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7122 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-16 05:15:09 +00:00
Malcolm Tredinnick 2542b94fb2 Fixed #6465 -- Tweaked MergeDict.getlist() to work with Django's MultiValueDict class. Thanks, Matt McClanahan.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7062 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-03 02:02:41 +00:00
Adrian Holovaty c5a4541f10 Edited docstring changes from [6714]
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6800 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-01 19:22:05 +00:00
Malcolm Tredinnick caa0523cb8 Fixed #6050 -- Handled edge-case of duplicate keys being passed when
initialising SortedDict. Patch from Collin Grady and SmileyChris.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6751 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-29 20:09:54 +00:00
Gary Wilson Jr c7181ec0ff Made `MultiValueDict`'s `get` and `getlist` method docstrings more descriptive.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6714 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-25 18:14:18 +00:00
Gary Wilson Jr 891cc5df92 Minor styling fix in `DotExpandedDict.__init__`.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6713 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-25 18:11:44 +00:00
Gary Wilson Jr 303d22b0d2 Changed several hardcoding of `dict` method calls in `django.utils.datastructures.py` to use `super` instead.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6712 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-25 18:10:45 +00:00
Gary Wilson Jr 8df3d2b467 In `MergeDict` class, changed variable names to not clash with `dict` builtin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6711 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-25 18:07:57 +00:00
Gary Wilson Jr 5e8be6978e Simplified `SortedDict.__deepcopy__` now that the its constructor can take a sequence of tuples.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6669 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-12 03:12:47 +00:00
Malcolm Tredinnick dbd1cb9083 Fixed #5183 -- Added __deepcopy__, pop() and popitem() to SortedDict. Based on
a patch from David Blewett.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6593 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-22 00:52:54 +00:00
Gary Wilson Jr 088cb3c2f3 Django coding style fixes.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6528 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-19 01:26:09 +00:00
Gary Wilson Jr 78d557bf02 Fixed #5744 -- Allowed SortedDict contructor to be passed a list of tuples to match the interface of dict, thanks Thomas Güttler.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6506 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-14 04:17:02 +00:00
Adrian Holovaty 4704412bb3 Fixed #5540 -- Made __repr__() for MultiValueDict more generic. Thanks, Thomas Guttler
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6383 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-20 01:56:02 +00:00
Malcolm Tredinnick ec7d80b9dd Fixed #3993 -- Added some useful dictionary methods to SortedDict, plus an insert() method. Patch from Paul Collier.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6350 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-16 03:27:38 +00:00
Russell Keith-Magee 84e824fbbf Fixed #3036 -- Fixed some doctest strings that were failing. Thanks to pterk for the original patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6268 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-15 08:29:56 +00:00
Russell Keith-Magee 50497e3867 Refs #5138 -- Refactored implementation of __contains__ in HttpRequest introduced in [6097] after a suggestion from Malcolm. Applied a similar refactor for MergeDict and Context which had comparable behavior.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6098 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-11 14:04:40 +00:00
Malcolm Tredinnick 3757f30c99 Fixed #4947 -- Avoid displaying uploaded file contents in the debug web page. Based on a patch from eibaan@gmail.com.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5874 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-12 12:02:08 +00:00
Malcolm Tredinnick 439cb4047f Fixed #4040 -- Changed uses of has_key() to "in". Slight performance
improvement and forward-compatible with future Python releases. Patch from Gary
Wilson.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5091 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-26 13:30:48 +00:00
Malcolm Tredinnick aca569804e Fixed #3964 -- Added a custom SortedDict.__repr__ so that the keys are printed
in sorted order. Based on a patch from Forest Bond.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5069 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-25 07:30:54 +00:00
Malcolm Tredinnick 535535a45e Removed a bunch of annoying trailing whitespace.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5068 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-25 07:25:22 +00:00
Adrian Holovaty 254e087e31 Fixed #4106 -- Fixed typo in datastructures.py. Thanks, Amr Mostafa
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5060 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-23 01:55:45 +00:00
Adrian Holovaty c3f91bb2b1 Fixed spelling of initializing in datastructures.py comment
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4744 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-03-16 15:10:48 +00:00
Malcolm Tredinnick 22178d692a Fixed #3678 -- Implemented SortedDict.copy().
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4688 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-03-09 05:34:42 +00:00
Jacob Kaplan-Moss 6ca7930dd4 Fixed #2779: added a copy() method to MergeDict, along with some new tests for django.utils.datastructures. Thanks, Chris McAvoy.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4640 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-28 00:35:50 +00:00
Jacob Kaplan-Moss 5b66c74b32 Fixed #2620: made MergeDict.get() correctly work with the two-argument form of get(). Thanks for the patch, SmileyChris.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4576 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-25 16:37:31 +00:00
Adrian Holovaty c770803f72 Added SortedDict.value_for_index() method in django.utils.datastructures
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4373 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-21 00:06:55 +00:00
Malcolm Tredinnick 35a13d4b6b Fixed #2791 -- Added __contains__ method (for "a in dict" checks) to MergeDict.
Thanks, Ned Batchelder.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@3808 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-23 13:55:04 +00:00
Adrian Holovaty 1d8db5ad89 Fixed #2441 -- Improved MultiValueDict.update() to take keyword args, like Python 2.4 built-in dict. Thanks for the patch, Pete Shinners
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3692 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-31 21:51:19 +00:00
Adrian Holovaty 2abfd5dd58 Fixed #2109 -- Convert old-style classes to new-style classes throughout Django. Thanks, Nicola Larosa
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3113 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-08 05:00:13 +00:00
Adrian Holovaty 643c7b23a9 Fixed #2079 -- Fixed bug introduced in [3070] in django.utils.datastructures
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3081 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-05 00:46:18 +00:00
Luke Plant 9b86db9bf2 Eliminated lots of mutable default arguments (since they are bugs
waiting to happen and are memory leaks too).


git-svn-id: http://code.djangoproject.com/svn/django/trunk@3070 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-03 13:37:34 +00:00
Adrian Holovaty f69cf70ed8 MERGED MAGIC-REMOVAL BRANCH TO TRUNK. This change is highly backwards-incompatible. Please read http://code.djangoproject.com/wiki/RemovingTheMagic for upgrade instructions.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2809 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-02 01:31:56 +00:00
Adrian Holovaty 3ff5b993d3 Fixed #1539 in trunk
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2578 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-03-28 17:31:04 +00:00
Adrian Holovaty 1714e79796 Changed repr for MultiValueDict
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1819 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-04 17:09:26 +00:00
Adrian Holovaty 5cff7360cb Fixed #1131 -- Added repr() to MultiValueDict. Thanks, Simon
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1789 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-28 23:11:07 +00:00
Adrian Holovaty 991bb61242 Fixed #736 -- Changed behavior of QueryDict items() to be more consistent, fixed mutability holes, gave MultiValueDict many more dictionary methods and added unit tests. Thanks, Kieran Holland. This is slightly backwards-incompatible if you happened to rely on the behavior of QueryDict.items(), which is highly unlikely.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1504 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-30 04:08:46 +00:00
Adrian Holovaty 674ac13ca6 Fixed #709 -- Added a __contains__ method to MultiValueDict. Thanks, Brantley
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1498 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-30 00:19:15 +00:00
Adrian Holovaty ed114e1510 Imported Django from private SVN repository (created from r. 8825)
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-07-13 01:25:57 +00:00