summaryrefslogtreecommitdiff
path: root/django/utils/encoding.py
Commit message (Collapse)AuthorAgeFilesLines
* [soc2010/query-refactor] Improved the ListField implementation, and added ↵Alex Gaynor2010-08-091-0/+1
| | | | | | an EmbeddedModelField. git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2010/query-refactor@13564 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #12164 -- Removed the Python 2.3 compatibility imports and ↵Russell Keith-Magee2010-05-041-6/+1
| | | | | | workarounds. Thanks to timo and claudep for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13094 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #12302: Modified force_unicode to avoid raising unicode errors whenKaren Tracey2010-02-281-1/+10
| | | | | | | | handed exceptions with non-ASCII bytestring data and no working unicode method under Python 2.6 and higher. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12621 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #12445 -- Added ' (single quote), @ (at sign), and ~ (tilde) to safe ↵Gary Wilson Jr2010-01-031-4/+13
| | | | | | characters in `iri_to_uri` function. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12066 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #10335: handle system locals unknown to Python in timezone name ↵Jacob Kaplan-Moss2009-05-081-0/+11
| | | | | | handling. Thanks, mitsuhiko. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10703 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #9522 -- Modified handling of values in base serializer so that field ↵Russell Keith-Magee2009-04-131-1/+14
| | | | | | subclasses can define their own value_to_string() method for serialization. Thanks to Alex Koshelev for the report and initial patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10554 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #5903 -- DecimalField.get_default() now correctly returns a Decimal ↵Brian Rosner2009-02-111-1/+8
| | | | | | object when the model instance was not retrieved from the database. Thanks Justin Driscoll and pigletto. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9823 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #6353 (again) by making force_unicode() and smart_str() a bit more robustMalcolm Tredinnick2008-08-261-1/+19
| | | | | | | | | in the face of funky Exception instances. This is slightly symptomatic of problems in the calling code, but we don't want to raise a secondary exception whilst trying to display the first one. Based on a patch from Karen Tracey. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8588 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #7847 -- Removed a whole bunch of unused imports from throughout the ↵Adrian Holovaty2008-07-221-2/+0
| | | | | | codebase. Thanks, julien git-svn-id: http://code.djangoproject.com/svn/django/trunk@8046 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #6301 -- Added '*' to the characters not converted by iri_to_uri(), asMalcolm Tredinnick2008-02-031-1/+1
| | | | | | | pointed out by samidh. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7064 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Implemented auto-escaping of variable output in templates. Fully ↵Malcolm Tredinnick2007-11-141-1/+5
| | | | | | | | | | | | | | controllable by template authors and it's possible to write filters and templates that simulataneously work in both auto-escaped and non-auto-escaped environments if you need to. Fixed #2359 See documentation in templates.txt and templates_python.txt for how everything works. Backwards incompatible if you're inserting raw HTML output via template variables. Based on an original design from Simon Willison and with debugging help from Michael Radziej. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6671 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #5640 -- Added some extra error reporting when smart_unicode() orMalcolm Tredinnick2007-11-041-7/+21
| | | | | | | | | force_unicode() raise a UnicodeDecodeError. This should at least help people identify which is the bad piece of data they passed in. About the best we can do here. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6649 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Added datetime.date to the things ignored by strings_only in [6406].Malcolm Tredinnick2007-10-201-1/+1
| | | | git-svn-id: http://code.djangoproject.com/svn/django/trunk@6567 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #5553 -- Fixed a serialization problem with datetime and time objects. ↵Russell Keith-Magee2007-09-221-1/+2
| | | | | | Thanks to pigletto for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6406 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed a small bug in strings_only handling for force_unicode().Malcolm Tredinnick2007-09-151-1/+1
| | | | git-svn-id: http://code.djangoproject.com/svn/django/trunk@6267 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #5077 -- django/utils/encoding.py no longer imports settings, as it ↵Adrian Holovaty2007-08-061-1/+0
| | | | | | doesn't use that module. Thanks, Collin Grady git-svn-id: http://code.djangoproject.com/svn/django/trunk@5810 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Merged Unicode branch into trunk (r4952:5608). This should be fullyMalcolm Tredinnick2007-07-041-16/+68
| | | | | | | | | 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
* Added a FIXME that I forgot to include earlier.Malcolm Tredinnick2007-04-041-0/+4
| | | | git-svn-id: http://code.djangoproject.com/svn/django/trunk@4923 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Moved smart_unicode and StrAndUnicode to django.utils.encoding. They are usefulMalcolm Tredinnick2007-04-041-0/+28
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