Commit Graph

160 Commits

Author SHA1 Message Date
Malcolm Tredinnick 05de381512 Fixed #1015 -- Fixed decorator_from_middleware to return a real decorator even
when arguments are given. This looks a bit ugly, but it's fully backwards
compatible and all the extra work is done at import time, so it shouldn't have
any real performance impact.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5619 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-05 11:10:27 +00:00
Malcolm Tredinnick 953badbea5 Merged Unicode branch into trunk (r4952:5608). This should be fully
backwards compatible for all practical purposes.

Fixed #2391, #2489, #2996, #3322, #3344, #3370, #3406, #3432, #3454, #3492, #3582, #3690, #3878, #3891, #3937, #4039, #4141, #4227, #4286, #4291, #4300, #4452, #4702


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5609 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-04 12:11:04 +00:00
Malcolm Tredinnick a56a8dacf3 Fixed small bug in Python 2.3 fallback for itertools.groupby. Refs #4506.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5526 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-24 12:38:11 +00:00
Malcolm Tredinnick fc20eeec47 Fixed a Python 2.3 incompatibility I overlooked in [5516].
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5517 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-23 06:02:17 +00:00
Malcolm Tredinnick 5f5f1d913b Fixed #4566 -- Added caching speed-ups to reverse URL matching. Based on a
patch from smoo.master@gmail.com.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5516 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-23 05:40:28 +00:00
Malcolm Tredinnick 284c6ba44b Fixed #4657 -- Fixed an error in an edge case of the urlizetrunc filter.
Thanks, SmileyChris.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5513 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-23 03:10:32 +00:00
Malcolm Tredinnick 2a34fbe043 Fixed #4506 -- Changed "regroup" template tag to use __eq__ instead of repr()
for grouping equality checking. Thanks, Brian Harring.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5484 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-17 07:33:18 +00:00
Malcolm Tredinnick 12771614db Fixed #4323 -- Added the ability to display author names without email
addresses to RSS 2.0 feeds.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5357 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-26 10:36:36 +00:00
Malcolm Tredinnick 92c35a0617 Fixed #2365, #3324 -- Renamed FloatField to DecimalField and changed the code
to return Decimal instances in Python for this field. Backwards incompatible
change.

Added a real FloatField (stores floats in the database) and support for
FloatField and DecimalField in newforms (analogous to IntegerField).

Included decimal.py module (as django.utils._decimal) from Python 2.4. This is
license compatible with Django and included for Python 2.3 compatibility only.

Large portions of this work are based on patches from Andy Durdin and Jorge
Gajon.



git-svn-id: http://code.djangoproject.com/svn/django/trunk@5302 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-21 01:29:58 +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 d744a660c4 Fixed #4137 -- Added translation markup to a couple of missed strings. Thanks,
Sung-Jin Hong.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5071 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-25 08:32:31 +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
Malcolm Tredinnick db8ca44981 Fixed #3958 -- Added lastBuildDate element to RSS feeds. Thanks,
baptiste.goupil@gmail.com.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@4981 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-09 12:25:31 +00:00
Malcolm Tredinnick 73c40c5999 Backed out a portion of [4919] until I can make it worth smoothly with
oldforms. Refs #3924.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@4933 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-05 14:52:33 +00:00
Malcolm Tredinnick e57d1bddda Small fix to [4931].
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4932 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-05 03:25:30 +00:00
Malcolm Tredinnick 8424ea39f8 Fixed #3918 -- Handle technical message IDs correctly when settings.USE_I18N is
False.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@4931 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-05 03:22:49 +00:00
Malcolm Tredinnick 56d56e5bac Added a FIXME that I forgot to include earlier.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4923 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-04 13:25:53 +00:00
Malcolm Tredinnick 5212911b19 Made django.utils.html.escape() work with unicode strings (and unicode-like
objects). Refs #3897.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@4919 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-04 06:43:28 +00:00
Malcolm Tredinnick 1bddac37b6 Moved smart_unicode and StrAndUnicode to django.utils.encoding. They are useful
outside of newforms. This is backwards compatible as far as smart_unicode goes
(since newforms.util still imports it). All imports of smart_unicode and
StrAndUnicode have also been updated.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@4918 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-04 06:34:19 +00:00
Malcolm Tredinnick 9107ab6e1d Fixed #3900 -- Included missing function in utils/translation/__init__.py.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4907 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-03 03:08:56 +00:00
Malcolm Tredinnick 286e676231 Delayed the reading of settings.USE_I18N until the first use of the i18n
functions. This solves a few import problems we are seeing. Fixed #3687. Refs #2920.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@4905 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-02 10:58:43 +00:00
Russell Keith-Magee 9191fa1f64 Fixed #3532 -- Made spaceless template tag remove all spaces, rather than preserving a single space. Thanks for the suggestion, ampaze@gmx.net.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4885 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-01 01:09:21 +00:00
Malcolm Tredinnick df119b7786 Removed some trailing whitespace that had smuggled itself aboard in [4870].
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4871 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-03-30 12:00:38 +00:00
Malcolm Tredinnick 5e739219de Fixed #3733 -- Fixed up quote parsing in smart_split(). Thanks, Ivan Chelubeev.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4870 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-03-30 11:57:50 +00:00
Russell Keith-Magee b8eec54041 Fixed #3714 -- Fixed handling of indented text in wordwrap template filter. Thanks for the fix, Ian Clelland.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4753 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-03-20 11:07:52 +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 2cf448152e Fixed #2998 -- Wrapped a couple more strings for translation. Thanks, Jannis
Leidel.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@4701 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-03-11 10:15:35 +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 28ad156f10 Fixed #3488: Added "b" option to date format filter. Thanks, Gary Wilson.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4647 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-28 16:18:55 +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
Malcolm Tredinnick 6c4757729b Revert [4485] in order to fix accidental mod_python breakage. Refs #2920.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4486 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-11 23:50:35 +00:00
Russell Keith-Magee 0e924c70b1 Refs #2920 -- Replaced implicit uses of _() with explicit imports or calls to gettext(). At some point post 0.96, we need to remove the calls that put _ into the builtins.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4485 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-11 06:20:52 +00:00
Malcolm Tredinnick 937f3190ba Fixed #2762 -- added copyright element support to RSS and Atom feeds. Patch
from Jonathan Buchanan.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@4478 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-10 08:36:39 +00:00
Malcolm Tredinnick 5a0b72a6eb Fixed #2027 -- added truncatewords_html filter that respects HTML tags whilst
truncating. Patch from SmileyChris.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@4468 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-10 02:51:27 +00:00
Jacob Kaplan-Moss 695302ce92 Fixed #3320: upgraded django.utils.simplejson to simplejson version 1.5. Thanks, Lawrence Oluyede.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4454 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-30 22:34:15 +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
Adrian Holovaty 3f4d6a2dda Changed dateformat 'M' to use MONTHS_3 instead of MONTHS, for better support of translations
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4226 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-18 16:16:12 +00:00
Jacob Kaplan-Moss 5efb9272e2 Vastly improved performance of django.utils.text.wrap. Thanks to GvR for the impetus and Micael Radziej for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4213 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-15 19:05:57 +00:00
Malcolm Tredinnick e149c8bb87 Fixed #2823 -- Fixed Python 2.3 compatibility problem pointed out by Alex Dedul.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3853 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-26 10:08:03 +00:00
Malcolm Tredinnick a27f12f388 Fixed #2265 -- Fixed problem with using iterators for "choices" attribute.
Thanks, Alex Dedul.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@3851 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-26 06:33:32 +00:00
Malcolm Tredinnick b05e5501a4 Fixed #2677 -- Removed the need to import sre and hence avoid a
DeprecationWarning. Thanks, Tom Tobin.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@3814 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-24 11:44:04 +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
Malcolm Tredinnick 4b5f0e2c87 Fixed #2657 -- Made some tweaks to Javascript quoting. Thanks, Alex Dedul.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3782 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-22 02:22:58 +00:00
Adrian Holovaty 8aa6a94e1a Renamed 'func' argument in django.utils.functional.curry to reduce possibility that it will clash with a keyword argument name. Thanks for pointing this out, Michael Spencer
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3735 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-07 18:26:00 +00:00
Adrian Holovaty 29ba3e337b Optimized django.utils.functional.curry. Thanks for the patch, Martin Glueck
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3733 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-07 04:21:11 +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 1bf811e28d Fixed #2330 -- Added hack to stop KeyErrors from being thrown by the autoreloading development server if USE_I18N=False
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3482 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-28 22:13:34 +00:00