0
0
mirror of https://github.com/django/django.git synced 2024-12-01 15:42:04 +01:00
Commit Graph

12524 Commits

Author SHA1 Message Date
Claude Paroz
d1452f6097 [py3] Favoured unicode strings in assert(Not)Contains
In Python 3, HTMLParser does not support bytestrings.
2012-08-14 12:19:17 +02:00
Aymeric Augustin
e04230e2e4 [py3] Ported django.http according to PEP 3333.
Perfomed some style cleanup while I was in the area.
2012-08-14 10:32:16 +02:00
Claude Paroz
0df0cf70d4 Reverted pickle-json replacement form_hmac calculation
This reverts commit b109ff8062 and
complement test cases. The change was too hasty, as some form
values cannot be json-serialized as is.
2012-08-14 09:51:39 +02:00
Claude Paroz
363dbd920e [py3] Fixed contrib.formtools tests 2012-08-13 21:26:12 +02:00
Claude Paroz
a025b75f6c [py3] Fixed iterlists usage in QueryDict 2012-08-13 21:25:27 +02:00
Claude Paroz
b109ff8062 Replaced pickle by json in form_hmac calculation
Refs #18340
2012-08-13 21:02:18 +02:00
Claude Paroz
0dac73ebd7 Removed binary flag to open files for writing text content 2012-08-13 18:23:26 +02:00
Florian Apolloner
d2975718fe Consistenly use _ as alias for ugettext_lazy in the i18n docs. 2012-08-13 16:54:13 +02:00
Claude Paroz
45baaabafb [py3] Fixed encoding issues in cache key generation 2012-08-13 12:56:59 +02:00
Claude Paroz
d774ad752d [py3] Made csrf context processor return Unicode 2012-08-13 11:54:21 +02:00
Claude Paroz
5e958b958b [py3] Avoided comparison with None value in formsets 2012-08-13 11:54:13 +02:00
Claude Paroz
73f0f18c8f [py3] Fixed admin_scripts tests 2012-08-13 10:58:21 +02:00
Claude Paroz
a06503d09b [py3] Fixed content encoding in test client
Thanks Andrews Medina for the initial patch.
2012-08-13 09:56:14 +02:00
Claude Paroz
6d68022a27 [py3] Removed filename encoding in file_uploads test 2012-08-13 09:56:14 +02:00
Anssi Kääriäinen
1930b899bd Refix #13844 -- Made FloatField aggregates work on Python 2.6 + Postgres
Fixed a regression introduced in 59a655988e.
2012-08-13 09:15:20 +03:00
Claude Paroz
8a1f439d3a [py3] Fix encoding issues in contrib.sessions 2012-08-12 22:49:10 +02:00
Claude Paroz
ac37c9e495 [py3] Encoded value before feeding it to hashlib.md5 2012-08-12 22:49:10 +02:00
Andrei Antoukh
99321e30ce Fixed #18306 -- Made deferred models issue update_fields on save
Deferred models now automatically update only the fields which are
loaded from the db (with .only() or .defer()). In addition, any field
set manually after the load is updated on save.
2012-08-12 22:39:27 +03:00
Anssi Kääriäinen
59a655988e Fixed #13844 -- Avoid converting unknown db values to float
This patch removes an unconditional float(value) conversion from db
backend default convert_values() method. This can cause problems when
aggregating over character fields for example. In addition, Oracle
and SQLite already return the bare value from their convert_values().

In the long term the converting should be done by fields, and the
fields should then call database backend specific converters when
needed. The current setup is inflexible for 3rd party fields.

Thanks to Merlijn van Deen for the original patch.
2012-08-12 21:52:52 +03:00
Claude Paroz
5513480fe1 [py3] Always convert values from sqlite3 to unicode strings
Thanks Aymeric Augustin for the review.
2012-08-12 20:47:18 +02:00
Claude Paroz
dce34dc969 [py3] Made __repr__ return str with Python 3 2012-08-12 20:45:39 +02:00
Anssi Kääriäinen
c1684e3dcb Fixed #18731 -- Cleaned up split_exclude's use of can_reuse
The outer query's set of reusable joins (can_reuse) was passed to the
inner query's add_filter call. This was incorrect.
2012-08-12 21:40:22 +03:00
Karen Tracey
49bb72c403 [py3] Made exception examination py3-compatible. 2012-08-12 12:08:58 -04:00
Aymeric Augustin
031896c510 [py3] Explained @python_2_unicode_compatible usage 2012-08-12 15:22:33 +02:00
Aymeric Augustin
4e68e86153 [py3] Deprecated StrAndUnicode.
This mix-in is superseded by the @python_2_unicode_compatible decorator.
2012-08-12 14:44:41 +02:00
Aymeric Augustin
d4a0b27838 [py3] Refactored __unicode__ to __str__.
* Renamed the __unicode__ methods
* Applied the python_2_unicode_compatible decorator
* Removed the StrAndUnicode mix-in that is superseded by
  python_2_unicode_compatible
* Kept the __unicode__ methods in classes that specifically
  test it under Python 2
2012-08-12 14:44:40 +02:00
Aymeric Augustin
79d62a7175 [py3] Added fixer for python_2_unicode_compatible.
This doesn't deal with classes that define both __unicode__ and
__str__; the definition of __str__ should be removed first. It
doesn't guarantee that __str__ will return a str (rather than bytes)
under Python 3 either.
2012-08-12 14:44:40 +02:00
Aymeric Augustin
a0a0203a39 [py3] Added python_2_unicode_compatible decorator. 2012-08-12 14:44:40 +02:00
Aymeric Augustin
e7e08fd48b [py3] Replaced some __str__ methods by __unicode__
These methods actually return unicode.
2012-08-12 14:44:40 +02:00
Aymeric Augustin
2bb2eecb63 [py3] Removed redundant __str__ methods.
These classes already have an identical __unicode__ method, which
will be used after an upcoming refactoring.
2012-08-12 14:44:40 +02:00
Aymeric Augustin
dbb63e56ea [py3] Avoided returning bytes in Model.__str__
on Python 3.
2012-08-12 14:44:40 +02:00
Florian Apolloner
9e7b5ba50f Removed missplaced label in the docs. 2012-08-12 12:43:05 +02:00
Martijn Vermaat
140179c770 Fix link to Gunicorn website in deployment howto. 2012-08-12 12:37:55 +02:00
Karen Tracey
759ae3c2da Fixed #18739 -- witdthratio behavior on None args
Made behavior given None consistent with how non-numerics were handled.
Thanks to ja.geb@me.com for the report.
2012-08-11 19:24:18 -04:00
Claude Paroz
15fffcc751 [py3] Fixed reraising of exceptions
reraise with second argument to None is not supported.
2012-08-11 23:46:23 +02:00
Karen Tracey
be7f1099c6 Decorated some tests that require tz support.
This allows the test suite to run without errors on Windows.
2012-08-11 17:32:24 -04:00
Claude Paroz
900816464d [py3] Re-decoded string after idna encoding 2012-08-11 23:23:31 +02:00
Claude Paroz
6602103338 [py3] Various minor syntax fixes in the test suite 2012-08-11 23:23:31 +02:00
Claude Paroz
7d0f883192 [py3] Fixed JSON deserialization 2012-08-11 23:23:31 +02:00
Karen Tracey
b82eb10b26 Fixed #18754 -- cache keys created by post_process
Corrected to always generate the cache keys from file names with
forward slashes, not backslashes.
2012-08-11 17:05:26 -04:00
Florian Apolloner
4d9e4c64f1 Fixed #18698 -- Configure latex to support '≥' in the docs.
Thanks to simonb for the report and the initial patch.
2012-08-11 21:48:11 +02:00
Claude Paroz
3eb28d0119 [py3] Used six.StringIO to simulate stdout buffer in tests 2012-08-11 18:56:14 +02:00
Claude Paroz
09c589810d [py3] Used smart_str to prevent regressions in http handling 2012-08-11 15:29:29 +02:00
Claude Paroz
f10a1b0641 [py3] Fixed Python 3 compatibility of http handling
* Using str() when Python 2 expects bytes and Python 3 Unicode
* Fixed reraise-ing syntax
* Fixed slicing of byte strings
2012-08-11 14:47:44 +02:00
Claude Paroz
22527a821b [py3] Fixed str_prefix test utility 2012-08-11 14:22:28 +02:00
Claude Paroz
97fe70d30b [py3] Used BytesIO to test request streams 2012-08-11 11:11:20 +02:00
Andrews Medina
87e0a75c03 [py3] Decoded base64-encoded hash in contrib.auth.hashers 2012-08-11 00:20:59 +02:00
Tim Graham
cb38fd9632 Fixed #17680 - Clarified when logging is configured. 2012-08-10 17:35:16 -04:00
Tim Graham
eff6ba2f64 Fixed #17016 - Added examples for file uploads in views.
Thanks Tim Saylor for the draft patch and Aymeric Augustin and Claude Paroz for feedback.
2012-08-10 16:19:20 -04:00
Claude Paroz
92b2dec918 [py3] Made signing infrastructure pass tests with Python 3 2012-08-10 18:07:46 +02:00