Aymeric Augustin
58a086acfb
Required serializer to use bytes in loads/dumps
...
loads has no way to tell if it should provide text or bytes to the
serializer; bytes are more reasonnable for a serialized representation,
and are the only option for pickled data.
dumps can perform conversions on the value it receives from the
serializer; but for consistency it seems better to require bytes too.
The current code would cause an exception when loading pickled session
data. See next commit.
Also fixed a bug when checking for compressed data.
2012-10-28 16:57:15 +01:00
Anssi Kääriäinen
611c4d6f1c
Fixed #18823 -- Ensured m2m.clear() works when using through+to_field
...
There was a potential data-loss issue involved -- when clearing
instance's m2m assignments it was possible some other instance's
m2m data was deleted instead.
This commit also improved None handling for to_field cases.
2012-10-28 17:31:35 +02:00
Aymeric Augustin
98032f67c7
Fixed #14093 -- Improved error message in the cache session backend.
...
Thanks stumbles for the patch.
2012-10-28 12:40:10 +01:00
Aymeric Augustin
785bf0d5a0
Reverted unintentional change in aff9b2f
.
2012-10-28 12:33:38 +01:00
Aymeric Augustin
aff9b2f566
Fixed #19203 -- Added isolation to a humanize test
...
Thanks lrekucki for the report.
2012-10-28 09:34:05 +01:00
Aymeric Augustin
5fec97b9df
Fixed #18194 -- Expiration of file-based sessions
...
* Prevented stale session files from being loaded
* Added removal of stale session files in django-admin.py clearsessions
Thanks ej for the report, crodjer and Elvard for their inputs.
2012-10-28 09:19:38 +01:00
Aymeric Augustin
882c47cd40
Improved tests introduced in 04b00b6
.
...
These tests are expected to fail for the file session backend because it
doesn't handle expiry properly. They didn't because of an error in the
test setup sequence.
Refs #19200 , #18194 .
2012-10-27 23:15:45 +02:00
Aymeric Augustin
cd17a24083
Added optional kwargs to get_expiry_age/date.
...
This change allows for cleaner tests: we can test the exact output.
Refs #18194 : this change makes it possible to compute session expiry
dates at times other than when the session is saved.
Fixed #18458 : the existence of the `modification` kwarg implies that you
must pass it to get_expiry_age/date if you call these functions outside
of a short request - response cycle (the intended use case).
2012-10-27 23:15:45 +02:00
Aymeric Augustin
04b00b668d
Fixed #19200 -- Session expiry with cached_db
...
Also did a little bit of cleanup.
2012-10-27 19:40:39 +02:00
Aymeric Augustin
83ba0a9d4b
Fixed #18978 -- Moved cleanup command to sessions.
...
This removes a dependency of 'core' on 'contrib'.
2012-10-27 18:31:00 +02:00
Anssi Kääriäinen
908efca817
Fixed #19198 -- merged 4 different Oracle fixes
2012-10-27 19:05:46 +03:00
Anssi Kääriäinen
b55de81b9e
Ensured gis tests aren't run on non-gis Oracle
2012-10-27 18:34:47 +03:00
Anssi Kääriäinen
c159d9cec0
Fixed Oracle failure caused by None converted to '' in select_related case
2012-10-27 05:26:53 +03:00
Anssi Kääriäinen
2249bd275c
Fixed Oracle failure for "%" in table name
2012-10-27 05:26:42 +03:00
Ramiro Morales
373df56d36
Advanced version identifiers for 1.6 cycle.
2012-10-26 22:01:34 -03:00
Anssi Kääriäinen
11699ac4b5
Fixed #19190 -- Refactored Query select clause attributes
...
The Query.select and Query.select_fields were collapsed into one list
because the attributes had to be always in sync. Now that they are in
one attribute it is impossible to edit them out of sync.
Similar collapse was done for Query.related_select_cols and
Query.related_select_fields.
2012-10-27 02:13:02 +03:00
Claude Paroz
be29329ccd
Fixed #16820 -- Treated '0' value as True for checkbox inputs
...
Thanks Dan Fairs for the report and the initial patch.
2012-10-26 20:44:00 +02:00
Ian Clelland
3266c26eb2
Properly support pickling of LazyObjects in Python 3.3
2012-10-26 01:40:33 +01:00
Ian Clelland
3629a159f9
PEP 302 source loaders already decode appropriately
2012-10-26 01:40:32 +01:00
Luke Plant
f3a2bcdee9
Fixed #15040 - Boolean fields return 0 and 1 when loaded through select_related
...
Thanks to homm for the report and ramiro for the patch.
2012-10-26 00:25:59 +01:00
Aymeric Augustin
45c8818503
Ensured get_version returns a native string.
...
Returning unicode triggers a bug in Python 2.7:
http://bugs.python.org/issue11638
This problem was introduced in 4a103086
(unicode_literals).
2012-10-25 21:49:18 +02:00
Anssi Kääriäinen
bd6d9ea87c
Fixed regression caused by #19102
2012-10-25 19:13:10 +03:00
Anssi Kääriäinen
7de439f32d
Fixed #19187 -- Raise consistent error from qs.values().delete()
2012-10-25 17:16:56 +03:00
Anssi Kääriäinen
11b8712cc7
Added docstring to DeleteQuery.delete_qs()
2012-10-25 17:16:56 +03:00
Anssi Kääriäinen
f64a5ef404
Fixed #19102 -- Fixed fast-path delete for modified SELECT clause cases
...
There was a bug introduced in #18676 which caused fast-path deletes
implemented as "DELETE WHERE pk IN <subquery>" to fail if the SELECT
clause contained additional stuff (for example extra() and annotate()).
Thanks to Trac alias pressureman for spotting this regression.
2012-10-25 17:16:44 +03:00
Aymeric Augustin
da56e1bac6
Fixed #18796 -- Refactored conversion to bytes in HttpResponse
...
Thanks mrmachine for the review.
2012-10-25 08:49:51 +02:00
Alex Gaynor
ce1eb320e5
Remove a case that is no longer reachable in encodings.py.
...
This case was originally designed to handle Exception's which didn't gracefully support coercing themselves to unicode. However, because it lives in the `else` case of `if hasattr(s, '__unicode__'):` we can be sure it's no longer reachable in djanog anymore, because since Python 2.5 exception has subclassed object, which means Exception objects always have an __unicode__ method.
2012-10-24 15:53:00 -07:00
Alex Gaynor
1b096ad773
Removed a function that is already fully implemented by a base class.
2012-10-24 12:49:57 -07:00
Aymeric Augustin
82b3e6ffcb
Fixed #13222 -- Made HttpResponse iterable once
...
response.content can be accessed many times as desired, and always
returns the same result.
iter(response) works only once and consumes the iterator.
2012-10-24 17:19:56 +02:00
Aymeric Augustin
495a8b8107
Fixed #6527 -- Provided repeatable content access
...
in HttpResponses instantiated with iterators.
2012-10-24 17:08:37 +02:00
Aymeric Augustin
c736a1a9f8
Fixed #19176 -- Typo in copy-pasted error message.
...
Thanks maxirobaina for the report.
2012-10-24 16:21:30 +02:00
Claude Paroz
9fd2f9c5f3
Fixed #19088 -- Always escape % inside blocktrans tag
...
Thanks vlinhart for the report and Łukasz Rekucki for the patch.
2012-10-23 18:49:22 +02:00
Carl Meyer
3541a10d49
Fixed #19164 -- Fixed diffsettings command broken in fix for #18545 .
...
Thanks Mario César for the report and draft patch.
2012-10-22 18:49:08 -06:00
Aymeric Augustin
ea57112d53
Reverted 6a64822bf4
.
...
This commit caused every test that does two or more assertContains to
fail, because of #6527 . It also made HttpResponse non-pickleable.
Refs #13222 .
2012-10-23 00:11:17 +02:00
Aymeric Augustin
11a4b6d923
Merge pull request #460 from JanBednarik/ticket_19162
...
Fixed #19162 -- Wrong indentation.
2012-10-22 14:43:28 -07:00
Aymeric Augustin
6a64822bf4
Fixed #13222 -- Repeated iteration of HttpResponse
...
Thanks teepark for the report and grahamd for his insights.
2012-10-22 22:52:36 +02:00
Jan Bednařík
4cceb5cb31
Fixed #19162 -- Wrong indentation.
2012-10-22 19:23:19 +02:00
Claude Paroz
58cc3e8484
Fixed #19157 -- Removed test-only string from translatable strings
...
Thanks Alexey Boriskin for the report. Refs #18240 .
2012-10-22 09:31:28 +02:00
Alex Gaynor
b4066d7d21
Cleaned up the the http module. Moved all of the code from __init__.py to request.py, response.py and utils.py
2012-10-21 11:12:59 -07:00
Claude Paroz
22471a41ba
Merge pull request #457 from JanBednarik/ticket_19142
...
Fixed #19142 -- Language codes can include numbers (RFC 3066)
2012-10-21 10:35:01 -07:00
Preston Holmes
1a3ff63199
Updated error message for bad database engine
...
removing typo in the process. Thanks to Carlos Palol for the catch.
Closes pull 450
2012-10-21 07:41:59 -07:00
Alex Gaynor
6b3d2bc981
Merge pull request #444 from mitar/patch-2
...
Allow reversed iteration over SortedDict.
2012-10-20 20:39:49 -07:00
Jan Bednařík
e6b34193c5
Fixed #19142 -- Language codes can include numbers (RFC 3066).
2012-10-21 01:25:35 +02:00
Jan Bednařík
b87e2f46c8
Fixed #19151 -- Added missing methods to EmptyQuerySet.
...
Added values() and values_list() methods to EmptyQuerySet.
2012-10-21 00:19:38 +02:00
Aymeric Augustin
4b27813198
Fixed #7581 -- Added streaming responses.
...
Thanks mrmachine and everyone else involved on this long-standing ticket.
2012-10-20 20:05:11 +02:00
Aymeric Augustin
c2e19e26bc
Fixed #17856 -- Passed obj to get_inline_instances
...
Thanks ybon, quinode and sjaensch for the patch, and Tim Graham
for the review.
2012-10-20 15:49:52 +02:00
Claude Paroz
dcbf08cce5
Fixed #19094 -- Improved FakePayload to support write, len and string input
...
Thanks Ondrej Slinták for the suggestion.
2012-10-20 15:36:24 +02:00
Claude Paroz
dfd4a71751
Fixed #5611 -- Restricted accepted content types in parsing POST data
...
Thanks paulegan for the report and Preston Holmes for the review.
2012-10-20 14:56:16 +02:00
Claude Paroz
681550ca6d
Removed custom WSGIRequestHandler.get_environ
...
We probably historically customized it for good reasons, but
currently, the differences with upstream Python are not
significant any longer.
Also fixes #19075 for which a test has been added.
2012-10-20 13:55:13 +02:00
Russell Keith-Magee
7a908747a5
Fixed #19150 -- Added validation for USERNAME_FIELD being included in REQUIRED_FIELDS.
...
Thanks to Chris Pagnutti for the suggestion.
2012-10-20 11:51:15 +08:00
Russell Keith-Magee
04b53ebfb7
Fixed #19133 -- Corrected regression in form handling for user passwords.
...
Thanks to pressureman for the report, and to Preston Holmes for the draft patch.
2012-10-20 11:41:54 +08:00
Ramiro Morales
0b908b92a2
Fixed #8001 -- Made redirections after add/edit in admin customizable.
...
Also fixes #18310 .
2012-10-18 20:58:52 -03:00
Preston Holmes
9305c0e12d
Fixed a security issue related to password resets
...
Full disclosure and new release are forthcoming
2012-10-17 14:36:41 -07:00
Claude Paroz
9d2e1f065e
Reported OpenLayersWidget exceptions through logging
2012-10-17 11:59:10 +02:00
Russell Keith-Magee
bfcda7781a
Fixed #19130 -- Made some of the auth forms more flexible for user models.
2012-10-16 16:03:29 +08:00
Claude Paroz
08286ca5d9
Made use of assertXMLEqual in sitemaps tests
2012-10-15 23:05:40 +02:00
Claude Paroz
6b0a836c9c
Fixed assertXMLEqual when first node was a comment
2012-10-15 23:05:40 +02:00
Claude Paroz
2ee6a46696
Fixed #15753 -- Cleared cache between sitemaps tests
...
When caching was activated, test_simple_sitemap would fail
because the test result was fetched from cache.
Thanks lucho for the initial patch and krzysiumed@gmail.com for
the review.
2012-10-15 21:11:32 +02:00
Adrian Holovaty
05b8491622
Added DeprecationWarning for django.contrib.localflavor.
...
Note this is DeprecationWarning instead of PendingDeprecationWarning because we've decided
to accelerate this particular deprecation.
2012-10-15 09:37:29 -05:00
Mitar
c3fabb282d
Allow reversed iteration over SortedDict.
...
Iterators cannot be reversed easily without this method.
2012-10-15 04:16:46 -07:00
Claude Paroz
58365401c9
Updated base translation files
2012-10-15 11:17:06 +02:00
Claude Paroz
afbf913b90
Build context strings out of [u|n]gettext
...
The context strings in [n]pgettext functions should not be marked
themselves for translation.
2012-10-15 10:00:22 +02:00
Ludovic Delaveau
7a44dc555a
Fixed #16479 - Forms generated from formsets use ErrorList instead of supplied error_class
...
Patch with tests from charettes, updated.
2012-10-13 15:28:20 +01:00
Daniele Procida
cc83a4af0c
Added 'groups' to UserAdmin.filter_horizontal
...
Is there some reason it's not there already?
Our list of groups is very cumbersome to use with the standard widget.
2012-10-13 14:58:36 +01:00
Claude Paroz
fa2e28ccc4
Fixed #18484 -- Removed the div around the csrf token input
2012-10-13 11:30:09 +02:00
Russell Keith-Magee
b3b3db3d95
Fixed #19067 -- Clarified handling of username in createsuperuser.
...
Thanks to clelland for the report, and Preston Holmes for the draft patch.
2012-10-13 13:36:07 +08:00
Russell Keith-Magee
c433fcb3fb
Fixed #19077 , #19079 -- Made USERNAME_FIELD a required field, and modified UserAdmin to match.
2012-10-13 11:44:50 +08:00
Claude Paroz
24c7d828b0
Moved de_CH/formats.py in its correct location
...
Refs #16188 .
2012-10-12 23:18:42 +02:00
Brian Galey
95f7ea3af1
Fixed #19028 -- Support GeoJSON output with SpatiaLite 3.0+
2012-10-12 17:23:22 +02:00
Anssi Kääriäinen
b5f224e8e2
Fixed tests introduced for #15915
...
The tests didn't clean up properly. The commit that introduced the
errors was 8c427448d5
.
Thanks to Trac alias rizumu for spotting this.
2012-10-12 00:10:49 +03:00
Claude Paroz
501d793398
Fixed #19107 -- Workarounded message-encoding bug on Python < 2.6.6
...
Thanks Bernardo Pires for the report.
2012-10-11 21:40:14 +02:00
Ian Clelland
f7b69665fd
Use renamed threading event API in Python 3.3
...
Refs #19038 .
2012-10-10 19:57:16 +02:00
Claude Paroz
dcdaf9a079
Fixed error output from runserver
...
This has been missed in commit 822d6d6dab
(Refs #18325 ).
2012-10-10 17:56:25 +02:00
Justin Bronn
f578ee32fa
Mark the test for left/right lookup types as a known failure on PostGIS 2.0.
2012-10-09 17:20:51 -07:00
Anssi Kääriäinen
b625e8272b
Moved F() '&' and '|' to .bitand() and .bitor()
...
Done for consistency with Q() expressions and QuerySet combining. This
will allow usage of '&' and '|' as boolean logical operators in the
future. Refs #16211 .
2012-10-10 01:15:29 +03:00
Anssi Kääriäinen
a8b1861fc4
Revert "Fixed #16211 -- Added comparison and negation ops to F() expressions"
...
This reverts commit 28abf5f0eb
.
Conflicts:
docs/releases/1.5.txt
2012-10-10 01:15:29 +03:00
Michael Manfre
c2150d4d2c
Fixed #19096 -- Made can_return_id_from_insert more extendable
...
RETURNING is an extension of the SQL standard, which is not implemented
the same by all databases. Allow DatabaseOperations.return_insert_id to
return a None to allow for other 3rd party backends with a different
implementation.
2012-10-10 01:00:58 +03:00
Aymeric Augustin
0a0fe8f71d
Fix exception message from 3190abcd
. Refs #18153 .
...
Thanks Preston Holmes.
2012-10-09 22:06:55 +02:00
Aymeric Augustin
3190abcd75
Fixed #18153 -- Reverse OneToOne lookups on unsaved instances.
...
Thanks David Hatch and Anssi Kääriäinen for their inputs.
2012-10-09 21:36:35 +02:00
Claude Paroz
273b96ef9d
Fixed #17867 -- Made email validation pass with IDN domains
...
Thanks Pierre Matri for the report and the initial patch.
2012-10-09 15:08:32 +02:00
Claude Paroz
9a2bceed1a
Use smarter string decoding in GeoDjango
...
The first try to solve the Python 3 GIS encoding/decoding issue
was too naive. Using decode() on all read strings is bound to fail
as soon as a non-ascii string is concerned.
This patch is a little more clever, leaving ascii decoding when
plain ascii strings are expected, and allowing to specify a custom
encoding in DataSource hierarchy.
2012-10-08 18:24:42 +02:00
Anssi Kääriäinen
a62d53c032
Fixed #19087 -- Ensured query's base table is never LOUTER joined
...
This fixes a regression created by join promotion logic refactoring:
01b9c3d519
Thanks to Ivan Virabyan for the report.
2012-10-08 18:40:09 +03:00
Claude Paroz
4797ad80da
[py3] Decoded the parsed source file encoding in debug view
2012-10-08 10:06:56 +02:00
Justin Bronn
88cc002e16
Moved Travis Pinney and Dane Springmeyer into the AUTHORS file where they belong.
2012-10-07 21:05:10 -07:00
Justin Bronn
75301d99d3
Fixed `inspectapp` tests to work with improved PG driver in GDAL 1.9+.
2012-10-07 20:08:31 -07:00
Justin Bronn
08eb54ae71
GDAL docstring tweaks.
2012-10-07 17:28:19 -07:00
Claude Paroz
34a736b752
Used pkgutil to get list of backend modules
...
Refs #18827 .
2012-10-07 21:59:16 +02:00
Claude Paroz
cb9f71dd99
Fixed #18640 -- Allowed access to GDAL Feature without Datasource
...
Thanks Justin Bronn for improving my initial patch.
2012-10-07 16:21:34 +02:00
Ramiro Morales
35e8dc5169
Removed ad-hoc support for usage of short names of built-in DB backends.
...
This non-standard naming was deprecated in Django 1.2.
2012-10-06 23:27:08 -03:00
Ramiro Morales
2100da9dcd
Ensure we ignore __pycache__ PEP 3174 dirs in a few more places.
2012-10-06 18:40:58 -03:00
Justin Bronn
91ef2a5253
Use native geometry types on PostGIS 2.0+ instead of `AddGeometryColumn` and don't query database in `PostGISCreation.sql_table_creation_suffix`.
2012-10-06 09:57:24 -07:00
Claude Paroz
8a2216648f
Un-gzipped test geometries fixture as plain json
...
This is easier to track changes through the VCS.
2012-10-06 14:40:00 +02:00
Claude Paroz
117e99511e
Added assertXML[Not]Equal assertions
...
This is especially needed to compare XML when hash randomization
is on, as attribute order may vary. Refs #17758 , #19038 .
Thanks Taylor Mitchell for the initial patch, and Ian Clelland for
review and cleanup.
2012-10-06 13:14:50 +02:00
Russell Keith-Magee
cc337a74f1
Fixed #19069 -- Improved the error message when trying to query a swapped model.
...
Thanks to Preston Holmes for the suggestion.
2012-10-06 14:21:57 +08:00
Russell Keith-Magee
b9039268a1
Fixed #19060 -- Corrected assumptions about the name of the User model in the ModelBackend.
...
Thanks to Ivan Virabyan for the report and initial patch.
2012-10-06 12:43:29 +08:00
Justin Bronn
d99639da03
Fixed type in MySQL spatial backend.
2012-10-05 18:49:59 -07:00
Justin Bronn
cd99c12f05
Fixed `F()` expression regressions in GeoDjango caused by recent datastructure changes in `SQLEvaluator`.
2012-10-05 18:41:50 -07:00
Justin Bronn
84f9741664
Fixed GMLv3 output test failure on PostGIS versions < 1.5.
2012-10-05 16:08:16 -07:00
Justin Bronn
5a64bd38e6
Forgot to import `unittest` from `django.utils`.
2012-10-05 15:51:45 -07:00
Justin Bronn
065b52f18e
Updated `GeoSQLCompiler.get_default_columns`.
2012-10-05 15:43:04 -07:00