Malcolm Tredinnick
8b3781cc68
unicode: Fixed #4430 -- Handle bytestrings and IRIs more robustly in feed
...
production. Thanks to Almad and Michal@plovarna.cz for some good debugging here.
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5389 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-31 09:04:55 +00:00
Malcolm Tredinnick
790d9ecf67
unicode: Changed handling of None in smart_unicode/force_unicode. There is no
...
case when converting it to a unicode string seems useful, so keep it as None.
Fixed #4435 .
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5388 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-31 09:03:29 +00:00
Malcolm Tredinnick
8d1ce1fd33
unicode: Changed all tests and documentation to use __unicode__ instead of
...
__str__ in places where it's appropriate to do so.
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5386 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-31 04:25:40 +00:00
Malcolm Tredinnick
ddae2ecfe4
unicode: Merged from trunk up to [5380].
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5381 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-29 13:09:48 +00:00
Malcolm Tredinnick
fa1a0532d3
unicode: Changed header construction for WSGI servers so that we only send
...
string types (not unicode that is coercable to ASII). Fixes a PEP 333 violation.
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5378 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-29 10:20:10 +00:00
Malcolm Tredinnick
d879bce166
unicode: Ensure that all the strings we put into a mod_python response are
...
strings.
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5377 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-28 13:49:15 +00:00
Malcolm Tredinnick
443d5b43ef
unicode: Fixed a bug in lazy_inter().
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5376 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-28 13:08:19 +00:00
Malcolm Tredinnick
4d31b5297b
Fixed #4403 -- Stopped pushing form error messages (which are unicode strings)
...
through a __str__ method.
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5375 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-28 13:02:16 +00:00
Malcolm Tredinnick
7bb9a8e3ae
unicode: Fixed a docstring from [5373].
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5374 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-28 11:56:09 +00:00
Malcolm Tredinnick
c6694dcdee
unicode: Fixed decoding problems in POST when a form upload was part of a form.
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5373 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-28 11:54:05 +00:00
Malcolm Tredinnick
1e8d1c808b
unicode: Fixed a problem when models had non-ASCII bytestrings for their
...
verbose_name.
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5372 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-28 11:04:13 +00:00
Malcolm Tredinnick
087bf45d93
unicode: Changed the place where we compute verbose_name_raw. It's done
...
on-demand now, rather than in contribute_to_class(), which was causing problems.
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5345 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-26 06:55:09 +00:00
Malcolm Tredinnick
e4cb94415e
unicode: Fixed __proxy__.__str__() handling. So gettext_lazy() will work more
...
naturally now.
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5344 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-26 06:39:10 +00:00
Malcolm Tredinnick
d5280e72d3
unicode: Fixed a dubious test construct.
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5343 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-25 10:36:14 +00:00
Malcolm Tredinnick
7ba850af3b
unicode: Added a more convenient way to set/change the encoding on a request
...
instance.
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5342 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-25 09:48:02 +00:00
Malcolm Tredinnick
29d2094b29
unicode: Changed the markup filters to use force_unicode() instead of
...
smart_unicode(), merely for consistency with the recommendations in the
documentation.
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5341 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-25 09:30:43 +00:00
Malcolm Tredinnick
c98f0b14c4
unicode: Filled in some missing pieces of documentation.
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5340 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-25 09:16:34 +00:00
Malcolm Tredinnick
545173ed4e
unicode: Added a check to ensure that iri_to_uri() remains idempotent.
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5339 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-25 07:31:03 +00:00
Malcolm Tredinnick
7b51097847
unicode: Added a unicode-aware version of urlencode. Since we now have a
...
collection of URL encoding functions, moved them into django.utils.http
(out of django.utils.html).
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5338 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-25 07:25:34 +00:00
Malcolm Tredinnick
78b75b9065
unicode: Merged from trunk up to [5333].
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5337 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-25 03:02:12 +00:00
Malcolm Tredinnick
5a396c8b1d
unicode: Typo fixing.
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5334 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-24 13:08:18 +00:00
Malcolm Tredinnick
b579a3cc64
unicode: Fixed some more Python 2.3 problems (thank-you, test suite!)
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5332 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-24 12:20:23 +00:00
Malcolm Tredinnick
c830b6cfef
unicode: Fixed a few Python 2.3 problems caused by 2.3's slightly brain-damaged
...
unicode string interpolation.
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5331 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-24 12:04:44 +00:00
Malcolm Tredinnick
9ce95c6775
unicode: Added a new docoment describing how wonderful our unicode support is
...
and documenting some of the unicode-specific features.
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5330 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-24 09:15:31 +00:00
Malcolm Tredinnick
dceac0a384
unicode: Added a "new in development version" marker to FILE_CHARSET.
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5329 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-24 09:13:13 +00:00
Malcolm Tredinnick
a09cb2a9e5
unicode: Added unicode-aware equivalents of urllib.quote() and
...
urllib.quote_plus() in django.utils.html.
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5328 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-24 06:44:54 +00:00
Malcolm Tredinnick
31d5d55090
unicode: Added call to iri_to_uri() on the result of a reverse() call. This
...
makes using the permalink() decorator more natural.
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5327 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-24 06:24:30 +00:00
Malcolm Tredinnick
fbce6f6bdc
unicode: Made some small tweaks to the i18n docs. The whole file could do with
...
a rewrite, though, I suspect.
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5324 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-24 02:20:34 +00:00
Malcolm Tredinnick
3989feed0c
unicode: Fixed #4367 -- Fixed a problem when trying to display some
...
legitimately non-unicode, non-UTF-8 data. The workaround is probably a bit
broad, but it shouldn't hurt in any unintended way I can think of.
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5323 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-24 01:25:51 +00:00
Malcolm Tredinnick
19d71a21df
unicode: Fixed one of the changes in [5320] in a slightly different way. This
...
should be backwards compatible with trunk, so it's one less things people need
to change.
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5322 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-24 01:01:32 +00:00
Malcolm Tredinnick
9c44751c08
unicode: Removed some redundant code.
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5321 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-24 00:48:36 +00:00
Malcolm Tredinnick
b25f6e9526
unicode: Fixed a number of problems where lazily translated objects were not
...
being converted back to unicode strings correctly. Fixed #4359 and #4361 .
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5320 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-23 03:46:57 +00:00
Malcolm Tredinnick
d72f630fdb
unicode: Documented the new iriencode filter and added a test to prove one of
...
my claims.
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5317 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-22 08:50:47 +00:00
Malcolm Tredinnick
0fc057c486
unicode: Fixed two bozo errors in [5315]. Even tested it this time.
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5316 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-22 08:28:06 +00:00
Malcolm Tredinnick
1c56e2d6d3
unicode: Encoded exception data safely in traceback output. Thanks, Thomas
...
Güttler. Refs #4300 .
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5315 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-22 08:22:54 +00:00
Malcolm Tredinnick
dd52eed2fb
unicode: Made lazy translation objects work properly. Fixed #4295 , #4320 .
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5314 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-22 08:06:57 +00:00
Malcolm Tredinnick
c2c585f0f0
unicode: Added a note about some tests that fail for MySQL. Changed the test
...
data slightly so that it will even fit into a server who's default encoding is
latin1, but still no luck. :-(
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5312 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-22 00:46:08 +00:00
Malcolm Tredinnick
6f23be4ee9
unicode: Merged from trunk up to [5308].
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5310 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-21 23:24:06 +00:00
Malcolm Tredinnick
f1091ec619
unicode: Fixed #4340 -- added a few character set encodings that PostgreSQL 7.x
...
can return. Pointed out by tim@tryphon.org .
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5286 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-19 17:05:02 +00:00
Malcolm Tredinnick
695a21ae7f
unicode: Fixed a couple of places where IRI fragments are being used and need
...
to be converted correctly.
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5284 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-19 00:19:17 +00:00
Malcolm Tredinnick
3d74a68a51
unicode: Fixed iri_to_uri() to be not quite as broken (I think it's spec
...
compliant now). Removed use of iri_to_uri() in the urlencode filter and made a
new iriencode filter, because IRI->URI conversionis are not a superset of URL
quoting converstions.
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5283 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-19 00:17:23 +00:00
Malcolm Tredinnick
68a0f4f51b
unicode: Added support for sending email that contains unicode data. Refs #3398 .
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5282 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-18 18:23:34 +00:00
Malcolm Tredinnick
e10da26109
unicode: Started making the necessary documentation changes required for
...
unicodification.
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5280 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-17 20:27:12 +00:00
Malcolm Tredinnick
6042458926
unicode: Merged from trunk up to [5265].
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5279 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-17 18:35:22 +00:00
Malcolm Tredinnick
c0b451fcfa
unicode: Added iri_to_uri() utility function and use it in the databrowse app.
...
Should make getting this stuff right a bit easier.
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5278 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-17 18:19:40 +00:00
Malcolm Tredinnick
52b0051523
unicode: Added (optional) explicit template encoding specification. Also ported
...
contrib.sitemaps over (we want to ensure the output XML is in a valid encoding,
so we force UTF-8 in this case).
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5277 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-17 16:55:38 +00:00
Malcolm Tredinnick
a8404e66fd
unicode: Audited most of the remaining contrib/ modules for unicode compliance
...
(only sitemaps remaining). Fixes here for databrowse, markup and webdesign.
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5274 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-17 01:24:58 +00:00
Malcolm Tredinnick
5b4e2637f9
unicode: Fixed urlencode filter to handle IRI portions and map them to URI
...
portions correctly.
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5273 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-17 01:19:03 +00:00
Malcolm Tredinnick
e4cd34cbee
unicode: Test changes that I forgot to commit in [5271].
...
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5272 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-16 23:11:49 +00:00
Malcolm Tredinnick
4a7727e46e
unicode: Unicode audit pass through localflavor. Also fixed a few common
...
stylistic errors.
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5271 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-16 23:10:31 +00:00