Commit Graph

153 Commits

Author SHA1 Message Date
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
Adrian Holovaty e433e07a8d Fixed #2408 -- Added get_language_from_request() to trans_null.py. Thanks, ubernostrum
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3458 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-27 16:38:32 +00:00
Jacob Kaplan-Moss a926046ba6 Second half of little cleanup tweaks suggested by pyflakes.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3414 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-21 20:39:17 +00:00
Adrian Holovaty dba1f95e12 Added check_for_language and to_locale to utils.translation.trans_null
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3344 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-14 02:55:42 +00:00
Adrian Holovaty 78adbd9434 Added get_language_bidi to django.utils.translation.trans_nuill. Refs #2203
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3329 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-11 14:08:42 +00:00
Adrian Holovaty 5ce4a56a7c Fixed bug in utils.translation.trans_null -- get_date_formats and get_partial_date_formats weren't returning tuples properly
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3306 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-10 04:08:45 +00:00
Adrian Holovaty 18eb7ecb13 Fixed #2310 -- Changed trans_null.py to use settings.LANGUAGE_CODE instead of hard-coded 'en'
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3298 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-08 13:58:33 +00:00
Adrian Holovaty de9630c60e Fixed #2258 -- Accounted for the case of a missing threading library in django.utils.synch. Thanks, scott@clued-in.co.uk
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3286 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-07 04:07:41 +00:00