1
0
mirror of https://github.com/django/django.git synced 2025-07-04 17:59:13 +00:00

3178 Commits

Author SHA1 Message Date
Malcolm Tredinnick
d3980231ff unicode: Changed the way re-encoding of form field submission works so that
file uploads are no longer completely broken. Added tests for this as well.


git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5464 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-11 20:02:08 +00:00
Malcolm Tredinnick
748ea65a61 unicode: Merged changes from trunk up to [5460].
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5462 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-11 14:51:26 +00:00
Malcolm Tredinnick
0b4122d138 unicode: Fixed the urlencode filter to work with non-ASCII strings. Fixed a
similar error in HttpRedirect processing.


git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5461 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-11 14:30:53 +00:00
Malcolm Tredinnick
75d29fa448 unicode: Fixed #4493 -- Fixed a problem where a __unicode__ method was not
returning a unicode object.


git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5447 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-09 14:44:27 +00:00
Malcolm Tredinnick
322c3e1454 unicode: Fixed #4495 -- Fixed a used of str() in the "firstof" template tag.
Patch from Ivan Sagalaev.


git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5446 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-09 14:34:14 +00:00
Malcolm Tredinnick
b43ecd823c unicode: Fixed #4479 -- Changed an errant gettext() call to ugettext().
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5445 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-09 14:30:24 +00:00
Malcolm Tredinnick
b792044d34 unicode: Merged from trunk up to [5443].
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5444 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-09 14:08:14 +00:00
Malcolm Tredinnick
8d30cdc267 unicode: Fixed #4472 -- Must return unicode objects from __unicode__ methods.
Lazy translation proxies are not an acceptable substitute.


git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5421 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-04 07:48:51 +00:00
Malcolm Tredinnick
fa689ae9c6 unicode: Implemented string interpolation for lazy objects.
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5420 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-03 05:35:06 +00:00
Malcolm Tredinnick
bb97eea9ec unicode: Merged from trunk up to [5418].
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5419 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-03 04:45:23 +00:00
Malcolm Tredinnick
554f4e7aa8 unicode: Reverted [5388] and fixed the problem in a different way. Checked
every occurrence of smart_unicode() and force_unicode() that was not previously
a str() call, so hopefully the problems will not reoccur. Fixed #4447. Refs #4435, #4430.


git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5400 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-01 07:30:40 +00:00
Malcolm Tredinnick
7a30b4e03a unicode: Merged from trunk up to [5398].
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5399 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-01 06:19:01 +00:00
Malcolm Tredinnick
797c1d2a85 unicode: Fixed #4442 -- Fixed a problem with string_concat() when
USE_I18N=False.


git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5390 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-31 09:51:39 +00:00
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