Aymeric Augustin
13338a6314
[py3] Minor cleanup in django.utils.archive.
2012-08-07 12:00:23 +02:00
Aymeric Augustin
67646dc28d
[py3] Ported django.test.doctest.
...
Based on Vinay Sajip's branch.
2012-08-07 12:00:22 +02:00
Aymeric Augustin
a8b3ddec5f
[py3] Applied minor fixes so the test suite starts
2012-08-07 12:00:22 +02:00
Aymeric Augustin
c5ef65bcf3
[py3] Ported django.utils.encoding.
...
* Renamed smart_unicode to smart_text (but kept the old name under
Python 2 for backwards compatibility).
* Renamed smart_str to smart_bytes.
* Re-introduced smart_str as an alias for smart_text under Python 3
and smart_bytes under Python 2 (which is backwards compatible).
Thus smart_str always returns a str objects.
* Used the new smart_str in a few places where both Python 2 and 3
want a str.
2012-08-07 12:00:22 +02:00
Aymeric Augustin
ee191715ea
[py3] Fixed access to dict keys/values/items.
2012-08-07 12:00:22 +02:00
Alex Gaynor
ede49c7ee0
Fixed #15754 -- avoid recursively computing the tree of media widgets more times than is necessary for a wiget
2012-08-06 07:59:59 -07:00
Brendan MacDonell
ad237fb72f
Fixed #18724 -- Fixed IntegerField validation with value 0
2012-08-06 10:42:21 +02:00
Justin Bronn
1c3464e809
Fixed testing on SpatiaLite 2.4, which has support for `InitSpatialMetaData`.
2012-08-04 18:10:34 -07:00
Tim Graham
86c5c0154f
Fixed a mistake in function documentation 'django.utils.functional.partition'
...
Thanks Raman Barkholenka for the patch.
2012-08-04 18:56:43 -04:00
Claude Paroz
09a719a4e6
Fixed #7833 -- Improved UserCreationForm password validation
...
Make UserCreationForm password validation similar to
SetPasswordForm and AdminPasswordChangeForm, so as the match
check is only done when both passwords are supplied.
Thanks Mitar for the suggestion.
2012-08-04 14:55:13 +02:00
Claude Paroz
121fd109de
Fixed #5524 -- Do not remove cleaned_data when a form fails validation
...
cleaned_data is no longer deleted when form validation fails but only
contains the data that did validate.
Thanks to the various contributors to this patch (see ticket).
2012-08-04 14:22:23 +02:00
Simon Meers
10f979fd92
Fixed #18700 -- Added URL reversal for i18n set_language view.
2012-08-04 20:57:12 +10:00
Aymeric Augustin
d01eaf7104
[py3] Removed uses of sys.maxint under Python 3.
...
Also fixed #18706 : improved exceptions raised by int_to_base36.
2012-08-03 18:51:28 +02:00
Alex Gaynor
129f1ac848
Remove a temporary variable deletion, it's not a big deal and it doesn't exist on python3.
2012-08-03 07:10:04 -07:00
Claude Paroz
9908201d7f
Replaced some byte strings by str() calls
...
This is a useful trick when Python 2 awaits byte strings and
Python 3 Unicode (regular) strings.
2012-08-03 15:18:13 +02:00
Claude Paroz
2407c45c18
Removed some pre-1.3.0 postgis compatibility code
2012-08-03 11:27:31 +02:00
Claude Paroz
c5d6f6d682
Reorganized geoapp gis tests
...
Removed the numbering of tests and moved lookup/geoqueryset tests
in their own test class.
2012-08-03 10:53:30 +02:00
Claude Paroz
a55cde8ab1
Fixed #18363 -- Improved Galician date and time format strings
...
Thanks Guttorm Flatabø for the report and the initial patch, and
Fran Dieguez for the review.
2012-08-03 09:35:39 +02:00
Claude Paroz
8fbfd21719
Fixed #18684 -- Added Finnish DATETIME_FORMAT
...
Thanks Guttorm Flatabø for the report and the initial patch.
2012-08-03 09:26:11 +02:00
Florian Apolloner
4129201c3e
Fixed a security issue in http redirects. Disclosure and new release forthcoming.
2012-07-30 22:01:50 +02:00
Florian Apolloner
b1d4634686
Fixed second security issue in image uploading. Disclosure and release forthcoming.
2012-07-30 21:57:22 +02:00
Florian Apolloner
dd16b17099
Fixed a security issue in image uploading. Disclosure and release forthcoming.
2012-07-30 21:54:29 +02:00
Alex Gaynor
e567f439bd
Merge pull request #225 from dekkers/remove-double-isinstance-check
...
Remove double isinstance check in force_unicode
2012-07-29 17:07:55 -07:00
Aymeric Augustin
ab6cd1c839
[py3] Updated dict-like data structures for Python 3.
...
The keys/items/values methods return iterators in Python 3, and the
iterkeys/items/values methods don't exist in Python 3. The behavior
under Python 2 is unchanged.
2012-07-25 22:58:48 +02:00
Florian Apolloner
4b5cb116e3
Fixed error message in detail generic view.
...
Thanks go to mitar for the report and the patch.
2012-07-25 22:46:57 +02:00
Marc Tamlyn
a875f612e0
Fixed #18634 -- Don't escape variables in the context for startproject/startapp.
...
The & symbols which can come up in the secret key were
being escaped to &.
2012-07-25 22:24:41 +02:00
Florian Apolloner
59d99772f0
Merge pull request #216 from ljosa/ticket_18644
...
Fixed #18644 -- Made urlize trim trailing period followed by parenthesis
2012-07-25 13:22:49 -07:00
Alex Gaynor
5ee8c3ef0c
Merge pull request #230 from pjdelport/cleanup
...
Cleanup
2012-07-25 13:07:10 -07:00
Aymeric Augustin
f3c9a16a42
Fixed QueryDict.setlistdefault.
...
It was broken by a seemingly innocuous change in MultiValueDict.
Document the pitfall for now. This is fragile and should be
considered for refactoring.
2012-07-25 19:10:40 +02:00
Aymeric Augustin
942818e1b3
Rolled back a unnecessary change in 8f002867b2
.
...
This keeps the implementation of setdefault and setlistdefault
consistent. Also it's marginally faster than looking up the value
again.
2012-07-25 10:16:35 +02:00
Alex Gaynor
ace9ccfe9f
Fixed #18666 -- when upgrading a user's password to a new algorithm only save the password field to the databaes.
2012-07-24 19:03:26 -07:00
Piet Delport
487b92a13c
it's -> its
2012-07-25 01:21:15 +02:00
Ramiro Morales
f758bdab5e
Fixed #18271 -- Changed stage at which TransactionTestCase flushes DB tables.
...
Previously, the flush was done before the test case execution and now
it is performed after it.
Other changes to the testing infrastructure include:
* TransactionTestCase now doesn't reset autoincrement sequences either
(previous behavior can achieved by using `reset_sequences`.)
With this, no implicit such reset is performed by any of the provided
TestCase classes.
* New ordering of test cases: All unittest tes cases are run first and
doctests are run at the end.
THse changes could be backward-incompatible with test cases that relied
on some kind of state being preserved between tests. Please read the
relevant sections of the release notes and testing documentation for
further details.
Thanks Andreas Pelme for the initial patch. Karen Tracey and Anssi
Kääriäinen for the feedback and Anssi for reviewing.
This also fixes #12408 .
2012-07-24 17:24:16 -03:00
Alex Gaynor
38ce709fe4
Added tests for deprecation warnings and fixed the argument order for the warnings.
2012-07-24 07:01:57 -07:00
Jeroen Dekkers
226a3e7e00
Remove double isinstance check in force_unicode
2012-07-24 00:45:40 +02:00
Aymeric Augustin
ae4125ffce
Removed a Python 3-compatibility hack.
...
Thanks Preston Holmes for the patch.
2012-07-23 13:48:04 +02:00
Claude Paroz
690cabe203
Used a Python 3-compatible syntax for building a translation table
2012-07-22 18:05:53 +02:00
Aymeric Augustin
a84d79f572
[py3] Added Python 3 compatibility for xrange.
2012-07-22 09:29:56 +02:00
Aymeric Augustin
ca07fda2ef
[py3] Switched to Python 3-compatible imports.
...
xrange/range will be dealt with in a separate commit due to the huge
number of changes.
2012-07-22 09:29:56 +02:00
Aymeric Augustin
0d914d08a0
[py3] Updated urllib/urllib2/urlparse imports.
...
Lots of functions were moved. Use explicit imports in all cases
to keey it easy to identify where the functions come from.
2012-07-22 09:29:55 +02:00
Aymeric Augustin
bdca5ea345
[py3] Replaced unicode/str by six.text_type/bytes.
2012-07-22 09:29:54 +02:00
Aymeric Augustin
3cb2457f46
[py3] Replaced basestring by six.string_types.
2012-07-22 09:29:54 +02:00
Aymeric Augustin
cacd845996
[py3] Fixed remaining Python 3 syntax errors.
...
django.utils.unittest.* weren't touched -- they're only imported on Python 2.6.
2012-07-22 09:29:53 +02:00
Aymeric Augustin
56dbe924a6
[py3] Removed longs.
2012-07-22 09:29:53 +02:00
Aymeric Augustin
f1d5dc81ac
[py3] Switched to Python 3-compatible introspection.
2012-07-22 09:29:53 +02:00
Aymeric Augustin
d11d45aad9
[py3] Used six.with_metaclass wherever necessary.
2012-07-22 09:29:52 +02:00
Aymeric Augustin
7fa51a24a8
[py3] Exception aren't iterable in Python 3.
2012-07-22 09:29:52 +02:00
Aymeric Augustin
d796c94b03
[py3] Used six.reraise wherever necessary.
2012-07-22 09:29:52 +02:00
Aymeric Augustin
473d5f4ba1
[py3] Fixed django.utils.six.moves.
...
It didn't work because six was inside django.utils.
2012-07-22 09:29:51 +02:00
Aymeric Augustin
8b01909841
[py3] Bundled six for Python 3 compatibility.
...
Refs #18363 .
2012-07-22 09:29:44 +02:00