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
Tom Christie
502be865c6
Add 'page_kwarg' attribute to `MultipleObjectMixin`, removing hardcoded 'page'.
2012-10-25 10:31:14 +01: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
Justin Bronn
1c010ce41d
Skip `LayerMapRouterTest` if there are not multiple databases.
2012-10-05 15:26:33 -07:00
Justin Bronn
c1b06c8137
Lowered tolerance to fix failing distance test.
2012-10-05 14:55:15 -07:00
Justin Bronn
db78086b45
Added comment in `geoapp` tests about PostGIS 2.0 change in ST_NumGeometries.
2012-10-05 14:47:04 -07:00
Justin Bronn
950e6183c6
Need to catch `ImproperlyConfigured` to be freed from the schackles of `DJANGO_SETTINGS_MODULE`.
2012-10-05 14:38:01 -07:00
Claude Paroz
53c8b2c0c5
Fixed #17959 -- Silenced output during GIS tests
2012-10-04 22:41:03 +02:00
Claude Paroz
0ad6d7e612
Removed unused and undocumented gdal_release_date function
2012-10-04 22:35:59 +02:00
Tim Graham
a1a5c0854f
Fixed #19051 - Fixed Selenium tearDownClass method; thanks glarrain for the report.
2012-10-04 06:45:22 -04:00
Mateusz Haligowski
8c427448d5
Fixed #15915 -- Cleaned handling of duplicate permission codenames
...
Previously, a duplicate model, codename for permission would lead to
database integrity error. Cleaned the implementation so that this case
now raises an CommandError instead.
2012-10-03 23:10:32 +03:00
Stephen Burrows
218abcc9e5
Fixed #14567 -- Made ModelMultipleChoiceField return EmptyQuerySet as empty value
2012-10-03 20:47:35 +03:00
Claude Paroz
d25a599dca
Fixed #19063 -- Fixed version parameter of gml GeoQuerySet method
...
Thanks lmisek@go2.pl for the report.
2012-10-03 13:32:26 +02:00
Russell Keith-Magee
934f35f1f9
Corrected test docstring.
2012-10-03 09:16:33 +08:00
Russell Keith-Magee
43530384b7
Fixed #19049 -- Corrected dumb logic negation error from earlier patch.
2012-10-03 09:14:55 +08:00
Russell Keith-Magee
3b6f980bed
Fixed #19049 -- Ensure that swapped models aren't included in reverse field caches.
...
Thanks to Ivan Virabyan for the report.
2012-10-02 22:52:45 +08:00
Preston Holmes
5f8b97f9fb
Fixed #19057 -- support custom user models in mod_wsgi auth handler
...
thanks @freakboy3742 for the catch and review
2012-10-02 06:42:05 -07:00
Russell Keith-Magee
4c75344cc1
Fixed #19056 -- Ensure admin change password template doesn't rely on username attribute.
2012-10-02 16:04:12 +08:00
Preston Holmes
2aac3ce0c6
Cleaned up loaddata command options help text
2012-10-01 14:46:12 -07:00
Claude Paroz
1ce4aedcef
Prevented flatpage view from directly accessing settings.SITE_ID
...
Refs #15089
2012-10-01 14:19:33 +02:00
Preston Holmes
e7723683dc
Fixed #9279 -- Added ignorenonexistent option to loaddata
...
Thanks to Roman Gladkov for the initial patch and Simon Charette for review.
2012-09-30 23:40:27 -07:00
Michael Farrell
7cc4068c44
Fixed #18616 -- added user_login_fail signal to contrib.auth
...
Thanks to Brad Pitcher for documentation
2012-09-30 22:34:50 -07:00
Claude Paroz
8bd7b598b6
Fixed #18807 -- Made 404.html and 500.html optional
...
Thanks Aymeric Augustin for the report and Jannis Leidel for the
review.
2012-09-30 23:16:19 +02:00
Claude Paroz
864a0514b8
Cared for PostGIS 2 renamed operations
2012-09-30 22:54:01 +02:00
Flavio Curella
92b5341b19
Fixed #16455 -- Added support for PostGIS 2.0
...
Thanks ckarrie for the report and the initial patches, Flavio Curella
for updating the patch, and Anssi Kääriäinen for testing. See ticket
for other valuable contributors.
2012-09-30 22:49:41 +02:00
Claude Paroz
08d675a98f
Fixed #7936 -- Added Last-Modified header to feeds
...
Thanks julianb for the report and the initial patch, and Roman
Gladkov for working on tests.
2012-09-30 22:40:25 +02:00
Anssi Kääriäinen
d5a4f209c3
Fixed #18991 -- Allowed permission lookup by "if in"
...
When looking permissions from PermWrapper it is now possible to use
{% if "someapp.someperm" in perms %} instead of
{% if perms.someapp.someperm %}.
2012-09-30 19:38:16 +03:00
Anssi Kääriäinen
28abf5f0eb
Fixed #16211 -- Added comparison and negation ops to F() expressions
...
Work done by Walter Doekes and Trac alias knoeb. Reviewed by Simon
Charette.
2012-09-30 17:51:06 +03:00
Anssi Kääriäinen
ddd7d1af20
Avoided storing ExpressionNodes in dicts
2012-09-30 17:50:56 +03:00
Claude Paroz
10e505b1b3
Moved filter at handler level
...
Filters at logger level are only processed for messages directly
logged to the specific logger, not for loggers in the parent chain.
As the 'django' logger is almost always processed as an inherited
logger, it makes more sense to filter messages at the 'console'
handler level.
2012-09-29 23:50:34 +02:00
Claude Paroz
f0f327bbfe
Fixed #18993 -- 'django' logger logs to console when DEBUG=True
...
Thanks Preston Holmes for the review.
2012-09-29 22:56:18 +02:00
Claude Paroz
a014ddfef2
Combined Django DEFAULT_LOGGING with user LOGGING config
...
Refs #18993 .
2012-09-29 22:56:18 +02:00
Florian Apolloner
6a6f589bfe
Merge branch 'ticket15695'
2012-09-29 21:57:50 +02:00
Claude Paroz
ffdd6595ea
Fixed #18919 -- Stopped dropping Z attribute when transforming geometries
...
Previously, the wkb of geometries was dropping the Z attribute.
Thanks luizvital for the report and tests and georger.silva@gmail.com
for the tests.
2012-09-29 12:33:18 +02:00
Claude Paroz
82a74dce24
Used TransactionTestCase in ModWsgiHandlerTestCase
...
Now the data created in setUp() is not discarded when the connection
is closed in the handler's methods.
2012-09-29 12:10:52 +02:00
Claude Paroz
2f6e00a840
Fixed #11948 -- Added interpolate and project linear referencing methods
...
Thanks novalis for the report and the initial patch, and Anssi
Kääriäinen and Justin Bronn for the review.
2012-09-29 11:22:28 +02:00
Russell Keith-Magee
15d355d79d
Fixed #19041 -- Corrected the handling of default usernames in createsuperuser.
2012-09-29 11:14:16 +08:00
Claude Paroz
6c2faaceb0
Made more extensive use of get_current_site
...
Refs #15089
2012-09-28 20:33:05 +02:00
Anssi Kääriäinen
1cd6e04cd4
Fixed #18676 -- Allow fast-path deletion of objects
...
Objects can be fast-path deleted if there are no signals, and there are
no further cascades. If fast-path is taken, the objects do not need to
be loaded into memory before deletion.
Thanks to Jeremy Dunck, Simon Charette and Alex Gaynor for reviewing
the patch.
2012-09-28 18:16:08 +03:00
Anssi Kääriäinen
3fcca0e947
Added a way to check if a signal has listeners
2012-09-28 18:10:52 +03:00
Claude Paroz
07ffe78143
Used get_current_site in comments feed class
2012-09-28 14:35:26 +02:00
Julien Phalip
b8244c654c
Fixed #18881 -- Made the context option in {% trans %} and {% blocktrans %} accept literals wrapped in single quotes. Thanks to lanyjie for the report.
2012-09-27 20:34:45 -07:00
Carl Meyer
751a7d0c32
Fixed #18518 -- Add warning re mod_wsgi and wsgi.py environ handling.
2012-09-27 20:35:57 -06:00
Preston Holmes
373932fa6b
fixed #10809 -- add a mod_wsgi authentication handler
...
Thanks to baumer1122 for the suggestion and initial
patch and David Fischer for the contributions and
long term patch maintenance and docs.
2012-09-27 12:43:37 -07:00
Preston Holmes
01362745ba
Fixed a small oversight in auth tests
...
Thanks to Vinicius Ruan Cainelli for the catch
closes #392
2012-09-27 10:24:34 -07:00
Florian Apolloner
b946db5241
Fixed #15695 -- Added `ResolverMatch` to the request object.
2012-09-27 15:06:58 +02:00
Anssi Kääriäinen
50d573d2c0
Fixed #18979 -- Avoid endless loop caused by "val in PermLookupDict"
...
Fixed by defining __iter__ which raises TypeError. This was done to
PermWrapper earlier.
2012-09-27 15:36:30 +03:00
Claude Paroz
3cbe686af6
Fixed #18675 -- Fixed was_modified_since with floating-point mtime
...
Thanks Simon Charette for the patch.
2012-09-26 21:12:56 +02:00
Claude Paroz
b3ee80a0cf
Fixed parse_http_date docstring and moved related tests
...
Refs #18675 .
2012-09-26 21:10:17 +02:00
Claude Paroz
bb7da7844f
Fixed #18845 -- Do not swallow AttributeErrors when running commands
2012-09-26 15:07:11 +02:00
Adrien Lemaire
2c8267bf3d
Fixed #17899 -- Rewrote [Ee]-mail to [Ee]mail
2012-09-26 14:14:51 +02:00
Russell Keith-Magee
70a0de37d1
Fixed #3011 -- Added swappable auth.User models.
...
Thanks to the many people that contributed to the development and review of
this patch, including (but not limited to) Jacob Kaplan-Moss, Anssi
Kääriäinen, Ramiro Morales, Preston Holmes, Josh Ourisman, Thomas Sutton,
and Roger Barnes, as well as the many, many people who have contributed to
the design discussion around this ticket over many years.
Squashed commit of the following:
commit d84749a0f0
Merge: 531e771
7c11b1a
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Wed Sep 26 18:37:04 2012 +0800
Merge remote-tracking branch 'django/master' into t3011
commit 531e7715da
Merge: 29d1abb
1f84b04
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Wed Sep 26 07:09:23 2012 +0800
Merged recent trunk changes.
commit 29d1abbe35
Merge: 8a527dd
54c81a1
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Mon Sep 24 07:49:46 2012 +0800
Merge remote-tracking branch 'django/master' into t3011
commit 8a527dda13
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Mon Sep 24 07:48:05 2012 +0800
Ensure sequences are reset correctly in the presence of swapped models.
commit e2b6e22f29
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Sun Sep 23 17:53:05 2012 +0800
Modifications to the handling and docs for auth forms.
commit 98aba856b5
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Sun Sep 23 15:28:57 2012 +0800
Improved error handling and docs for get_user_model()
commit 0229209c84
Merge: 6494bf9
8599f64
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Sun Sep 23 14:50:11 2012 +0800
Merged recent Django trunk changes.
commit 6494bf91f2
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Mon Sep 17 21:38:44 2012 +0800
Improved validation of swappable model settings.
commit 5a04cde342
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Mon Sep 17 07:15:14 2012 +0800
Removed some unused imports.
commit ffd535e413
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Sun Sep 16 20:31:28 2012 +0800
Corrected attribute access on for get_by_natural_key
commit 913e1ac84c
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Sun Sep 16 20:12:34 2012 +0800
Added test for proxy model safeguards on swappable models.
commit 280bf19e94
Merge: dbb3900
935a863
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Sun Sep 16 18:16:49 2012 +0800
Merge remote-tracking branch 'django/master' into t3011
commit dbb3900775
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Sun Sep 16 18:09:27 2012 +0800
Fixes for Python 3 compatibility.
commit dfd72131d8
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Sun Sep 16 15:54:30 2012 +0800
Added protection against proxying swapped models.
commit abcb027190
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Sun Sep 16 15:11:10 2012 +0800
Cleanup and documentation of AbstractUser base class.
commit a9491a8776
Merge: fd8bb4e
08bcb4a
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Sun Sep 16 14:46:49 2012 +0800
Merge commit '08bcb4aec1ed154cefc631b8510ee13e9af0c19d' into t3011
commit fd8bb4e3e4
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Sun Sep 16 14:20:14 2012 +0800
Documentation improvements coming from community review.
commit b550a6d06d
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Sun Sep 16 13:52:47 2012 +0800
Refactored skipIfCustomUser into the contrib.auth tests.
commit 52a02f1110
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Sun Sep 16 13:46:10 2012 +0800
Refactored common 'get' pattern into manager method.
commit b441a6bbc7
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Sun Sep 16 13:41:33 2012 +0800
Added note about backwards incompatible change to admin login messages.
commit 08bcb4aec1
Author: Anssi Kääriäinen <akaariai@gmail.com>
Date: Sat Sep 15 18:30:33 2012 +0300
Splitted User to AbstractUser and User
commit d9f5e5addb
Author: Anssi Kääriäinen <akaariai@gmail.com>
Date: Sat Sep 15 18:30:02 2012 +0300
Reworked REQUIRED_FIELDS + create_user() interaction
commit 579f152e4a
Merge: 9184972
93e6733
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Sat Sep 15 20:18:37 2012 +0800
Merge remote-tracking branch 'django/master' into t3011
commit 918497218c
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Sat Sep 15 20:18:19 2012 +0800
Deprecate AUTH_PROFILE_MODULE and get_profile().
commit 334cdfc1bb
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Sat Sep 15 20:00:12 2012 +0800
Added release notes for new swappable User feature.
commit 5d7bb22e8d
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Sat Sep 15 19:59:49 2012 +0800
Ensure swapped models can't be queried.
commit 57ac6e3d32
Merge: f2ec915
abfba3b
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Sat Sep 15 14:31:54 2012 +0800
Merge remote-tracking branch 'django/master' into t3011
commit f2ec915b20
Merge: 1952656
5e99a3d
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Sun Sep 9 08:29:51 2012 +0800
Merge remote-tracking branch 'django/master' into t3011
commit 19526563b5
Merge: 2c5e833
c4aa26a
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Sun Sep 9 08:22:26 2012 +0800
Merge recent changes from master.
commit 2c5e833a30
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Sun Sep 9 07:53:46 2012 +0800
Corrected admin_views tests following removal of the email fallback on admin logins.
commit 20d1892491
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Sun Sep 9 01:00:37 2012 +0800
Added conditional skips for all tests dependent on the default User model
commit 40ea8b8882
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Sat Sep 8 23:47:02 2012 +0800
Added documentation for REQUIRED_FIELDS in custom auth.
commit e6aaf65970
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Sat Sep 8 23:20:02 2012 +0800
Added first draft of custom User docs.
Thanks to Greg Turner for the initial text.
commit 75118bd242
Author: Thomas Sutton <me@thomas-sutton.id.au>
Date: Mon Aug 20 11:17:26 2012 +0800
Admin app should not allow username discovery
The admin app login form should not allow users to discover the username
associated with an email address.
commit d088b3af58
Author: Thomas Sutton <me@thomas-sutton.id.au>
Date: Mon Aug 20 10:32:13 2012 +0800
Admin app login form should use swapped user model
commit 7e82e83d67
Merge: e29c010
39aa890
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Fri Sep 7 23:45:03 2012 +0800
Merged master changes.
commit e29c010beb
Merge: 8e3fd70
30bdf22
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Mon Aug 20 13:12:57 2012 +0800
Merge remote-tracking branch 'django/master' into t3011
commit 8e3fd703d0
Merge: 507bb50
26e0ba0
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Mon Aug 20 13:09:09 2012 +0800
Merged recent changes from trunk.
commit 507bb50a92
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Mon Jun 4 20:41:37 2012 +0800
Modified auth app so that login with alternate auth app is possible.
commit dabe362836
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Mon Jun 4 20:10:51 2012 +0800
Modified auth management commands to handle custom user definitions.
commit 7cc0baf89d
Author: Russell Keith-Magee <russell@keith-magee.com>
Date: Mon Jun 4 14:17:28 2012 +0800
Added model Meta option for swappable models, and made auth.User a swappable model
2012-09-26 18:48:09 +08:00
Claude Paroz
1f84b042f1
Fixed #19020 -- Do not depend on dict order in formtools tests
...
Thanks metzen for the report and initial patch, and Łukasz Rekucki
for an inspirational patch on his randomhash_fixes branch.
2012-09-25 18:41:57 +02:00
Ramiro Morales
f51eab796d
Fixed #18072 -- Made more admin links use reverse() instead of hard-coded relative URLs.
...
Thanks kmike for the report and initial patch for the changelist->edit
object view link URL.
Other affected links include the delete object one and object history
one (in this case the change had been implemented in commit 5a9e127
, this
commit adds admin-quoting of the object PK in a way similar to a222d6e.)
Refs #15294 .
2012-09-24 22:02:59 -03:00
Claude Paroz
fc69fff9ab
Fixed #14861 -- Moved logging config outside of Settings.__init__
...
Thanks donspaulding for the report and simonpercivall for the
initial patch.
2012-09-24 22:12:45 +02:00
Claude Paroz
6eda8d784a
Enlarged exception catching when testing for GDAL presence
...
Other import errors than ImportError can happen during import of
GDAL files (e.g. OGRException). Some further auditing may be needed
if we want to restrict the catched exceptions at a later stage.
Thanks Ramiro Morales for raising the issue.
2012-09-24 16:06:04 +02:00
Claude Paroz
54c81a1c93
[py3] Allowed bytes in get_prep_value for a Geometry
2012-09-23 22:49:22 +02:00
Claude Paroz
43c7f8c3a3
[py3] Fixed unicode string in geoapp test
2012-09-23 22:11:46 +02:00
Claude Paroz
874908e3bb
[py3] Updated PostGIS adapter
2012-09-23 20:32:52 +02:00
Claude Paroz
799786a7b6
[py3] Fixed outdated map() call in GIS sql compiler
2012-09-23 20:32:52 +02:00
Claude Paroz
5330cd50cd
[py3] Fixed GEOS/GDAL tests
2012-09-23 19:59:27 +02:00
Claude Paroz
8cdc84726e
[py3] Added buffer/memoryview compatibility
...
Even if buffer and memoryview are not strictly identical, it should
be safe to consider them equivalent for GIS support.
Thanks Aymeric Augustin for the review.
2012-09-23 19:55:53 +02:00
Aymeric Augustin
3174b5f2f5
Fixed #18982 - Caught TypeError in DateField.clean
...
Thanks gwahl at fusionbox com.
2012-09-23 13:27:01 +02:00
Claude Paroz
8599f64e54
Fixed #18861 -- Triggered message validation with locmem email backend
...
Thanks Bruno Renié for the report and the initial patch.
2012-09-22 15:17:13 +02:00
Brian Galey
0ab8c58ca8
Fixed #18968 -- Only use separate GML regex for SpatiaLite < 3.0
2012-09-22 15:10:42 +02:00
Aymeric Augustin
822cfce3df
Fixed #18951 -- Formatting of microseconds.
...
Thanks olofom at gmail com for the report.
2012-09-22 12:02:21 +02:00
Aymeric Augustin
baa33cd8fa
Fixed #16218 -- date_list order in generic CBVs.
...
Thanks nnrcschmdt for the report and bpeschier for the initial
version of the patch.
2012-09-22 11:47:34 +02:00
Claude Paroz
59afc18f37
Made geo3d tests independent from each other
2012-09-22 11:39:53 +02:00
Dan Loewenherz
69ff1b7390
Fixed #16835 -- add groups to auth.user admin list_filter
2012-09-22 00:16:22 -07:00
Claude Paroz
486e67598f
Fixed #10853 -- Skipped some sessions tests with dummy cache backend
2012-09-21 13:17:25 +02:00
Claude Paroz
26ff2be787
Imported getLogger directly from logging module
...
This was a remainder of some 2.4 compatibility code.
2012-09-20 21:03:24 +02:00
Claude Paroz
89136b2725
Fixed #16577 -- Added a map_creation block in openlayers.js template
2012-09-20 10:31:37 +02:00
Claude Paroz
7e32dab3a6
Fixed #17687 -- Made LayerMapping router-aware
...
Thanks nosamanuel@gmail.com for the report and the initial patch.
2012-09-20 10:12:47 +02:00
Carl Meyer
4e9a74b81d
Revert "Fixed #16865 -- Made get_or_create use read database for initial get query."
...
Thanks to Jeremy Dunck for pointing out the problem with this change. If in a
single transaction, the master deletes a record and then get_or_creates a
similar record, under the new behavior the get_or_create would find the record
in the slave db and fail to re-create it, leaving the record nonexistent, which
violates the contract of get_or_create that the record should always exist
afterwards. We need to do everything against the master here in order to ensure
correctness.
This reverts commit 901af86550
.
2012-09-19 11:15:12 -06:00
Carl Meyer
901af86550
Fixed #16865 -- Made get_or_create use read database for initial get query.
...
Thanks Rick van Hattem for the report and trbs for the patch.
2012-09-19 10:06:53 -06:00
Dave Hall
44767f2caf
Use unicode.translate to speed up js escaping.
2012-09-18 21:15:15 +02:00
Jeremy Dunck
40e62a5ccd
Fixed #18980 -- Fixed assertContains regression when passed an object
2012-09-18 21:05:41 +02:00
Florian Apolloner
319e135519
Fixed #18800 -- Support numbers bigger than max float in `numberformat`.
...
Thanks to jbvsmo for the patch and Brad Pitcher for the tests.
2012-09-18 19:43:50 +02:00
Florian Apolloner
23d0136314
Merge branch 'lotheac-fix_uploaded_file_exec'
2012-09-17 22:54:26 +02:00
Florian Apolloner
e8c6aff3bf
Fixed #18947 -- Don't make uploaded files executeable by default.
...
Thanks to Lauri Tirkkonen for the patch.
2012-09-17 22:53:10 +02:00
Florian Apolloner
06f79354d0
Added tests for d21f3d9b17
.
2012-09-17 21:56:19 +02:00
Florian Apolloner
d21f3d9b17
Only update `last_login` instead of the whole user object in `update_last_login`.
2012-09-17 19:52:22 +02:00
Anssi Kääriäinen
f399a804c9
Fixed #17485 regression -- only + select_related interaction
...
When doing deeper than one level select_related() + only queries(), the
code introduced in b6c356b7bb
errored
incorrectly.
Thanks to mrmachine for report & test case.
2012-09-16 22:58:40 +03:00
Julien Phalip
c555741aa7
Fixed #18530 -- Fixed a small regression in the admin filters where wrongly formatted dates passed as url parameters caused an unhandled ValidationError. Thanks to david for the report.
2012-09-15 16:20:56 -07:00
Claude Paroz
c7f44ae085
Fixed #17948 -- Isolated auth tests from custom template loaders
...
Thanks andrey@kostenko.name for the report.
2012-09-15 21:39:08 +02:00
Claude Paroz
65793d714c
Used ST_AsText for testing PostGIS raw query
...
AsText will not be supported in further versions of PostGIS (>=2).
2012-09-15 12:02:28 +02:00
Tim Graham
87c06fa4f4
Merge pull request #364 from martey/ticket_18933
...
Fixed #18933 - Fixes code example for cycle in docstring.
2012-09-13 12:23:28 -07:00
Claude Paroz
690170a8b9
Removed unused quoting/encoding in gis db backend
2012-09-13 20:17:52 +02:00
Claude Paroz
7e5ebcce53
Fixed #18795 -- Fixed failing GeoDjango tests
...
Proj.4 and SRS strings may slightly vary depending on the installed
libraries. Made some tests pass again with recent Proj.4/GDAL lib
versions.
2012-09-13 16:20:11 +02:00
Claude Paroz
fbd4b3a518
[py3] Fixed GeoDjango mutable list tests
2012-09-12 16:13:58 +02:00
Claude Paroz
c2c8d4044e
Made minimal changes to make gis test suite start with Python 3
2012-09-12 15:03:46 +02:00
Claude Paroz
1aa218b857
Fixed test output check when password is blank
2012-09-12 11:58:02 +02:00
Claude Paroz
703c266682
Fixed #18182 -- Made is_usable_password check if hashing algorithm is correct
...
The display of the ReadOnlyPasswordHashWidget has also been improved to
distinguish empty/unusable password from erroneous password.
Fixed #18453 also.
Thanks danielr and Leo for the reports and Moritz Sichert for the
initial patch.
2012-09-12 11:32:50 +02:00
Claude Paroz
859aa2a6c4
Fixed #18790 -- Encoded database password on Python 2
...
Thanks thcourbon@gmail.com for the report.
2012-09-12 10:16:49 +02:00
Claude Paroz
f1bdfbd24b
Document and test 'type' usage in Widget attrs
...
Refs #16630 .
2012-09-10 19:31:11 +02:00
Collin Anderson
f416ea9c8d
fixed rfc comment typo in middleware/csrf.py
2012-09-10 12:11:24 -03:00
Mike Grouchy
cb1614f7b3
Fixed #18611 -- Display current date/time when running runserver
2012-09-10 13:35:21 +02:00
Carl Meyer
fcec904e4f
Fix an HTML-parser test that's failed in Python 2.6.8 since 5c79dd58
.
...
The problem description in #18239 asserted that
http://bugs.python.org/issue670664 was fixed in Python 2.6.8, but based on
http://bugs.python.org/issue670664#msg146770 it appears that's not correct; the
fix was only applied in 2.7, 3.2, and Python trunk. Therefore we must use our
patched HTMLParser subclass in all Python 2.6 versions.
2012-09-09 12:13:42 -06:00
Carl Meyer
75ef980e20
Fix Python 3 test failure introduced in a78dd109
.
2012-09-09 11:37:21 -06:00
Florian Apolloner
9ca17f883d
Replace nested try/finally try/except with try/except/finally.
2012-09-09 13:00:10 +02:00
Martey Dodoo
3fb2662edc
Fixes #18933 . Fixes code example in docstring.
...
Makes code example of silent keyword docstring in cycle templatetag
method the same as in the documentation.
2012-09-09 00:35:40 -04:00
Malcolm Tredinnick
5e99a3d41b
Adjust d7853c5
to not show ignorable warnings when running tests.
2012-09-08 20:28:31 -04:00
Malcolm Tredinnick
c4aa26a983
Internal refactoring; moving LOOKUP_SEP up one level.
...
In an ideal world, nothing except django.db.models.query should have to
import stuff from django.models.sql.*. A few things were needing to get
hold of sql.constants.LOOKUP_SEP, so this commit moves it up to
django.db.models.constants.LOOKUP_SEP.
There are still a couple of places (admin) poking into sql.* to get
QUERY_TERMS, which is unfortunate, but a slightly different issue and
harder to adjust.
2012-09-08 19:51:36 -04:00
Carl Meyer
a78dd109e6
Fixed #15552 -- LOGIN_URL and LOGIN_REDIRECT_URL can take URLpattern names.
...
Thanks UloPe and Eric Florenzano for the patch, and Malcolm Tredinnick for
review.
2012-09-08 16:58:35 -06:00
Carl Meyer
67dceeef44
Remove a couple unused imports.
2012-09-08 14:30:11 -06:00
Carl Meyer
307706d082
Fixed #18545 -- Make the 'no DJANGO_SETTINGS_MODULE' error message more useful.Thanks Nick Coghlan for the report, and Malcolm Tredinnick for review.
2012-09-08 14:26:33 -06:00
Claude Paroz
d7853c55ed
Removed warning check in test_load_overlong_key
...
Some backends issue a warning here, others not. This is not the primary
goal of the test, so the assertion about the warning has been removed.
Thanks Carl Meyer for noticing the issue and suggesting the fix.
2012-09-08 21:31:46 +02:00
Travis Swicegood
4754f122dd
Moved the admin inline JS to new JS files for cleanliness.
2012-09-08 15:09:37 -04:00
Aymeric Augustin
7207327dd3
Updated docs for dates generic views.
...
Fixes #18245 . Refs #3542 .
2012-09-08 12:22:39 -04:00
Preston Holmes
3da43c1111
Fixed #18054 -- Deprecated contrib.markup. Thanks to simukis for the initial patch.
2012-09-08 12:13:46 -04:00
Travis Swicegood
ccd1bb0d81
Remove Admin's swallowing of AttributeError ( #16655 , #18593 , #18747 )
...
During the new-admin changes, catching of AttributeError was added to
the admin. This patch removes that as it's no longer possible to add a
value to a ModelAdmin that is not available. Adding an attribute that
can not be called causes an ImproperlyConfigured exception to be raised.
2012-09-08 11:20:05 -04:00
Claude Paroz
09a99714c0
Moved get_primary_key_column implementation to base
...
Refs #17574 .
2012-09-08 10:24:13 +02:00
Aymeric Augustin
4e1fd38bd6
Fixed #18781 -- Reduced max session cookie size.
2012-09-07 19:24:02 -04:00
Aymeric Augustin
9b07b5edeb
Fixed #18916 -- Allowed non-ASCII headers.
...
Thanks Malcolm Tredinnick for the review.
2012-09-07 19:08:57 -04:00
Alex Gaynor
b865009d41
Fixed #12397 -- allow safe_join to work with the root file system path, which means you can have your root template or file upload path at this location. You almost certainly don't want to do this, except in *very* limited sandboxed situations.
2012-09-07 16:49:22 -04:00
Alex Gaynor
ad50243cd1
[py3k] Fixed the index creation code that I committed a few minutes ago for py3k.
2012-09-07 15:33:02 -04:00
Alex Gaynor
335a9f9cf1
Removed many uses of bare "except:", which were either going to a) silence real issues, or b) were impossible to hit.
2012-09-07 15:08:07 -04:00
Alex Gaynor
6a5a12ea3e
Fixed #17888 -- no longer silence exceptions inside of check_test. Thanks to brutasse for the patch.
2012-09-07 14:37:21 -04:00
Alex Gaynor
e4ea536774
Ensued that SQL indexes are alwasy created in the same name.
...
Previous this used Python's builtin hash() function, which has never been guarnteed to be stable across implementations (CPython/Jython/etc.) or 32/64 bitness. However, this in practice it was stable. However, with the impending release of Python 3.3 hash randomizations is enabled by default, which would mean the index name changed between program invocations.
2012-09-07 14:14:06 -04:00
Alex Gaynor
292322f977
[py3k] Silence many warnings while running the tests.
2012-09-07 13:17:34 -04:00
Dan Loewenherz
7055e20d24
wrap long words in field labels on admin forms, closes #18755
...
Otherwise, words overlap into the fields themselves, which makes the labels
unreadable.
2012-09-07 11:19:12 -04:00
Alex Gaynor
0e296131bb
Cleaned up some small bits of the ORM, including removing an import *.
2012-09-07 10:58:17 -04:00
Claude Paroz
39aa8901e1
Made use of property decorator in formsets.py
2012-09-06 23:08:15 +02:00
Adrian Holovaty
4193a0f3d5
Negligible spacing fix in auth/forms.py
2012-09-04 16:47:45 -04:00
Claude Paroz
22f85b9057
Fixed #18824 -- Allow deleting a setting from overriden settings
2012-09-04 09:41:12 +02:00
Claude Paroz
cc9b767fc6
Fixed #18902 -- Made force_bytes properly handle exception input
...
Thanks Aymeric Augustin for the report and the initial patch.
2012-09-04 09:27:28 +02:00
Claude Paroz
28fd876bae
Fixed #17892 -- Do not include whole RegexURLPattern lists in RegexURLResolver repr
...
Thanks milosu for the report and the initial patch.
2012-09-01 22:20:46 +02:00
Claude Paroz
306d34873c
Fixed #18212 -- Standardized arguments of GenericIPAddressField
...
Unlike other model fields, the newly introduced (1.4)
GenericIPAddressField did not accept verbose_name and name as the
first positional arguments. This commit fixes it.
Thanks Dan McGee for the report and the patch.
2012-09-01 18:38:55 +02:00
Tim Graham
f7142b6111
Fixed #9920 - Clarfied empty string vs. localhost in settings database host.
...
Thanks chromano for the draft patch.
2012-09-01 09:03:05 -04:00
Florian Apolloner
d05eee0119
Merge pull request #313 from davidfischer/master
...
Fix comment typo
2012-08-31 03:03:43 -07:00
Claude Paroz
a9a773ff38
Made get_table_description also return the size of char fields on SQLite
2012-08-30 19:36:05 +02:00
Claude Paroz
879b245baa
Fixed #5725 -- Fixed varchar column size introspection for MySQL
...
Thanks ferdonline for the initial patch and Karen Tracey for the
related post on django-users.
2012-08-30 19:28:13 +02:00
Claude Paroz
fb3d916c20
Fixed #18751 -- Cleaned up BaseFormSet._should_delete_form
...
We can do that now that cleaned_data is guaranteed to be
present. Related to [121fd109
].
Thanks Simon Charette for his work on the ticket.
2012-08-30 15:51:13 +02:00
Claude Paroz
ae88e73fa6
Replaced some smart_xxx by force_xxx equivalent
...
smart_str/smart_text should only be used when a potential lazy
string should be preserved in the result of the function call.
2012-08-30 15:46:16 +02:00
David Fischer
06b1dedae5
Fixed comment typo
2012-08-29 17:09:47 -07:00
Aymeric Augustin
723c9a8c6d
[py3] Ported the 'shell' management command.
...
The user module and the execfile function were removed in Python 3.
Thanks Linovia for the report.
2012-08-29 23:44:12 +02:00
Claude Paroz
4e70ad11d2
Made FileSystemStorage accept both text and byte streams
...
Thanks Alexey Boriskin for his help on the patch.
2012-08-29 16:37:37 +02:00
Claude Paroz
361d6738f8
Fixed #11739 -- Made ContentFile support Unicode input
2012-08-29 11:21:33 +02:00
Claude Paroz
ebc773ada3
Replaced many smart_bytes by force_bytes
...
In all those occurrences, we didn't care about preserving the
lazy status of the strings, but we really wanted to obtain a
real bytestring.
2012-08-29 11:20:32 +02:00
Florian Apolloner
3afb5916b2
Fixed #18091 -- Non-ASCII templates break `django-admin.py startproject --template=TEMPLATE`.
...
Thanks to Claude Huchet and Tomáš Ehrlich for the patch.
2012-08-28 23:23:07 +02:00
Aymeric Augustin
20012b961e
[py3] Updated bundled version of six
2012-08-28 23:20:55 +02:00
Mitar
b2ffa2ea90
Code comment fix.
2012-08-26 14:28:44 -07:00
Ramiro Morales
5a9e127efc
Made model instance history admin view link not hard-coded. Refs #15294 .
2012-08-26 17:54:49 -03:00
Aymeric Augustin
28ea4d4b07
Fixed #18852 -- Restored backwards compatibility
...
in django.core.signing. Specifically, kept the same return types
(str/unicode) under Python 2. Related to [92b2dec918
].
2012-08-25 22:22:32 +02:00
Claude Paroz
62e1c5a441
Fixed #17448 -- Improved test and documented raw-sql gis query
2012-08-25 14:39:52 +02:00
Anssi Kääriäinen
01b9c3d519
Fixed #16715 -- Fixed join promotion logic for nested nullable FKs
...
The joins for nested nullable foreign keys were often created as INNER
when they should have been OUTER joins. The reason was that only the
first join in the chain was promoted correctly. There were also issues
with select_related etc.
The basic structure for this problem was:
A -[nullable]-> B -[nonnull]-> C
And the basic problem was that the A->B join was correctly LOUTER,
the B->C join not.
The major change taken in this patch is that now if we promote a join
A->B, we will automatically promote joins B->X for all X in the query.
Also, we now make sure there aren't ever join chains like:
a LOUTER b INNER c
If the a -> b needs to be LOUTER, then the INNER at the end of the
chain will cancel the LOUTER join and we have a broken query.
Sebastian reported this problem and did also major portions of the
patch.
2012-08-25 14:14:45 +03:00
Claude Paroz
d7a2e816a1
Added a GeoDjango test with a raw query (Refs #17448 )
...
Thanks David Eklund for the initial patch.
2012-08-25 11:12:43 +02:00
Alex Gaynor
b7c3b044fc
Cleaned up the implementation of in_bulk
2012-08-24 16:08:16 -07:00
Claude Paroz
f5ea730dac
Fixed #18843 -- Replaced more special chars in column names (inspectdb)
...
Thanks airstrike for the report.
2012-08-23 22:59:45 +02:00
Claude Paroz
395c6083af
Fixed #12460 -- Improved inspectdb handling of special field names
...
Thanks mihail lukin for the report and elijahr and kgibula for their
work on the patch.
2012-08-23 21:46:57 +02:00
Claude Paroz
44c09de555
Fixed #18678 -- HttpResponse init arguments allowed for subclasses
...
Thanks hp1337@gmail.com for the report.
2012-08-23 10:59:22 +02:00
Aymeric Augustin
03671ad7e3
Reordered imports
...
to avoid an error introduced in 5301a9d7b1
.
2012-08-23 10:24:50 +02:00
Aymeric Augustin
5301a9d7b1
[py3] Removed duplicate imports.
...
Fixed #18837 . Refs #18791 .
2012-08-23 10:16:16 +02:00
Claude Paroz
7cfe8e8fce
Fixed #11340 -- Prevented HttpResponseNotModified to have content/content-type
...
The HTTP 1.1 spec tells that the 304 response MUST NOT contain a
message body.
Thanks aparajita for the report.
2012-08-22 20:55:24 +02:00
Claude Paroz
e2b4eddc11
Used the decorator syntax for properties in django.http
2012-08-22 20:55:24 +02:00
Simon Meers
dfe63a52ef
Revert "Fixed #18063 -- Avoid unicode in Model.__repr__ in python 2"
...
This reverts commit 3fce0d2a91
.
2012-08-22 11:48:47 +10:00
Claude Paroz
4353a6163c
Fixed #18196 -- Improved loaddata error messages.
2012-08-21 21:52:25 +02:00
Anssi Kääriäinen
a193372753
Fixed #17886 -- Fixed join promotion in ORed nullable queries
...
The ORM generated a query with INNER JOIN instead of LEFT OUTER JOIN
in a somewhat complicated case. The main issue was that there was a
chain of nullable FK -> non-nullble FK, and the join promotion logic
didn't see the need to promote the non-nullable FK even if the
previous nullable FK was already promoted to LOUTER JOIN. This resulted
in a query like a LOUTER b INNER c, which incorrectly prunes results.
2012-08-21 21:23:57 +03:00
Claude Paroz
fd58d6c258
Merge walk and find_files in makemessages command
2012-08-21 14:43:37 +02:00
Claude Paroz
ab2f65bb7f
Removed obsolete __members__ definitions
...
This was useful for pre-Python 2.6 support. See commit c6e8e5d9
.
2012-08-21 11:20:22 +02:00
Aymeric Augustin
e89bc39935
Reverted type check added in 62954ba04c
.
...
Refs #17040 .
2012-08-21 09:00:55 +02:00
Aymeric Augustin
62954ba04c
[py3] Fixed #17040 -- ported django.utils.crypto.constant_time_compare.
...
This is a private API; adding a type check is acceptable.
2012-08-20 22:50:49 +02:00
Aymeric Augustin
54899d810d
[py3] Fixed #18805 -- ported createsuperuser.
...
Thanks sunsesh at gmail.com for the report.
2012-08-20 22:25:41 +02:00
Claude Paroz
bfc380baea
[py3] Prepared MySQL backend for Python 3 compatibility
2012-08-20 10:46:21 +02:00
Simon Meers
3fce0d2a91
Fixed #18063 -- Avoid unicode in Model.__repr__ in python 2
...
Thanks guettli and mrmachine.
2012-08-20 16:47:30 +10:00
Anssi Kääriäinen
4db38cbfe1
[py3] Fixed Oracle specific failures
2012-08-19 23:45:26 +03:00
Aymeric Augustin
2f59e94a41
Fixed #18728 -- Made colon optional in tzinfo
...
Made two-digit hours and minutes mandatory in tzinfo (the code used
to crash if a one-digit representation was provided).
Added standalone tests for django.utils.dateparse.
2012-08-19 21:47:41 +02:00
Aymeric Augustin
a43ecc0444
Removed an inaccurate statement
...
in docstrings of dateparse functions.
2012-08-19 21:25:41 +02:00
Aymeric Augustin
5f2d9cdbb1
[py3] Fixed another regression from 2892cb0ec4
.
2012-08-19 18:24:50 +02:00
Aymeric Augustin
2892cb0ec4
[py3] Fixed regression introduced in 536b030363
.
...
Refs #18764 .
Reverted 536b030363
and switched to a more explicit way of avoiding
calling bytes(<int>).
This definitely deserves a refactoring. Specifically, _get_content
should just return b''.join(self). Unfortunately that's impossible
with the current tests.
2012-08-19 17:56:46 +02:00
Aymeric Augustin
536b030363
[py3] Supported integers in HttpResponse
...
Fixed #18764 .
2012-08-19 16:38:21 +02:00
Julien Phalip
675431dfaa
Fixed #17278 -- Enabled the spatialite GIS tests to run without having to specify a database name in the settings. Thanks to Aymeric for the report and to Ramiro for the initial patch.
2012-08-19 02:17:45 -07:00
Karen Tracey
e99293250e
[py3] Fixed slow path through file_move_safe
...
This path is taken on Windows.
2012-08-18 15:44:09 -04:00
Andrew Godwin
1758bf76e4
Merge pull request #287 from uruz/ticket18791
...
Fixed #18791 : [py3] Double import of six in django.forms.widgets
2012-08-18 09:45:16 -07:00
Andrew Godwin
bf12c663d9
Merge pull request #289 from mjtamlyn/slugify-real-function
...
Fixed bug in 212b982
-- Removed duplicate code in removetags
2012-08-18 09:41:06 -07:00
Andrew Godwin
5b09fc8ad2
Merge pull request #288 from mjtamlyn/date-list-period
...
Fixed #3542 -- Add support for changing granularity on ArchiveView.
2012-08-18 09:10:52 -07:00
Marc Tamlyn
e4984812cd
Fixed bug in 212b982
-- Removed duplicate code in removetags
2012-08-18 17:09:37 +01:00
Marc Tamlyn
8d5c11caad
Fixed #3542 -- Add support for changing granularity on ArchiveView.
...
Resolving the concept from a very old ticket in a more class-based-view
manner.
2012-08-18 17:03:57 +01:00
Aymeric Augustin
afc1bd7ab8
[py3] Made 212b9826bd
Python 3-friendly
2012-08-18 17:51:16 +02:00
Alexey Boriskin
abc4038b0b
Fixed #18791 : [py3] Double import of six in django.forms.widgets
2012-08-18 19:17:42 +04:00
Aymeric Augustin
de3ad8bb2d
[py3] Avoided passing a lazy string to urlparse.
...
This causes an exception under Python 3.
Fixed #18776 .
2012-08-18 16:38:49 +02:00
Aymeric Augustin
a120fac65a
Introduced force_bytes and force_str.
...
This is consistent with the smart_* series of functions and it's going
to be used by the next commit.
2012-08-18 16:38:49 +02:00
Marc Tamlyn
f04bb6d798
Fixed #17228 -- params context variable is inconsistent
...
Remove the params variable from the context and just put the variables
in directly.
This had not been committed previously as the original pattern was used
in the functional generic views and we wanted consistency between them,
but django.views.generic.simple.direct_to_template is now gone so we can
do it 'right'.
2012-08-18 15:07:21 +01:00
Marc Tamlyn
212b9826bd
Fixed #14516 -- Extract methods from removetags and slugify template filters
...
Patch by @jphalip updated to apply, documentation and release notes
added.
I've documented strip_tags as well as remove_tags as the difference
between the two wouldn't be immediately obvious.
2012-08-18 15:07:21 +01:00
Marc Tamlyn
58683e9c82
Fixed #16744 -- Class based view should have the view object in the context
...
Updated the most recent patch from @claudep to apply again and updated
the documentation location.
2012-08-18 15:07:21 +01:00
Aymeric Augustin
547b181046
[py3] Ported django.utils.safestring.
...
Backwards compatibility aliases were created under Python 2.
2012-08-18 16:04:06 +02:00
Marc Tamlyn
bfa9fc69bf
Fixed #18779 -- URLValidator can't validate url with ipv6.
...
Validation is reasonably 'soft', as for the ipv4. False positives don't
matter too much here.
2012-08-18 12:08:44 +01:00
Aymeric Augustin
16ab519f62
[py3] Removed gratuitous use of map/lambda
...
that causes a test failure on Python 3 because map returns an iterator.
2012-08-18 11:55:36 +02:00
Aymeric Augustin
85e7a5e140
[py3] Stopped attempting to translate bytes.
...
That goes actively against the goal of cleaning string handling.
2012-08-18 11:36:09 +02:00
Aymeric Augustin
2284419a2c
[py3] Fixed cache tests.
2012-08-18 11:15:05 +02:00
Aymeric Augustin
f34de7dd6e
[py3] Fixed backends tests.
2012-08-18 11:02:38 +02:00
Aymeric Augustin
4c1286cf78
[py3] Added compatibility import of thread/_thread
...
This commit fixes the auto-reload of the development server.
I should have done that change in ca07fda2
.
2012-08-18 10:56:56 +02:00
Aymeric Augustin
527f967ec1
[py3] Fixed formtools tests.
...
Python 3 adds a new pickle protocol. The tests were updated in a way
that makes it easy to add another pickle protocol, should Python gain
one.
Thanks Thomas Pelletier for providing an initial version of this patch.
2012-08-18 10:39:33 +02:00
Aymeric Augustin
1ad05172cb
[py3] Fixed file_storage tests.
2012-08-18 10:24:23 +02:00
Ramiro Morales
4c934f3921
Made createsuperuser more robust when getting current OS username.
...
Under some versions of OS X, failure in getting the default system
locale during the syncdb operation of the auth app were causing hard to
diagnose problems afterwards.
No solution based on getpreferredencoding() was chosen because it has
its own problems with certain combinations of Python and OS X versions
(e.g. http://bugs.python.org/issue6202 ).
Thanks prestonsimmons for the report and prestonsimmons and willhardy
for the initial patch.
Fixes #16017 .
2012-08-17 23:15:20 -03:00
Claude Paroz
6e4c984098
[py3] Workarounded a Python bug in mail header encoding
2012-08-17 20:19:14 +02:00
Aymeric Augustin
d739d531a1
[py3] Fixed a regression introduced in fcc8de0598
.
...
Thanks George Marshall for the report.
2012-08-16 22:04:50 +02:00
Claude Paroz
5c79dd5865
Fixed #18239 -- Subclassed HTMLParser only for selected Python versions
...
Only Python versions affected by http://bugs.python.org/issue670664
should patch HTMLParser.
Thanks Raphaël Hertzog for the initial patch (for 1.4).
2012-08-16 21:03:11 +02:00
Claude Paroz
d69bd23b55
Fixed Python version check in testcases.py
2012-08-16 15:31:01 +02:00
Aymeric Augustin
fcc8de0598
[py3] Ported django.core.servers.
2012-08-16 13:01:16 +02:00
Aymeric Augustin
688678e7c0
[py3] Avoided relying on 2.x-only internals
...
in LiveServerTestCase.
2012-08-16 09:56:42 +02:00
Dmitry Shevchenko
4412de5d8d
[py3] Fixed installed_models filtering.
2012-08-16 01:08:45 -05:00
Ramiro Morales
62c3f6362a
Fix changes introduced in fd04e7 so they don't break on Python 3.
2012-08-15 23:08:16 -03:00
Adrian Holovaty
fd04e711d2
Added import of force_unicode to utils/text.py
...
For backwards compatibility with stupid people like me. Refs #18772 .
2012-08-15 16:59:31 -05:00
Aymeric Augustin
27d16a3ca4
[py3] Fixed middleware_exceptions tests.
2012-08-15 22:53:52 +02:00
Claude Paroz
24de85c419
[py3] Fixed more encoding issues in cache tests
2012-08-15 22:48:09 +02:00
Claude Paroz
2b157b0adc
[py3] Fixed slug regex
...
In Python 3, \w matches any Unicode character.
2012-08-15 21:07:48 +02:00
Claude Paroz
60f5e10230
[py3] Fixed dispatch tests
2012-08-15 18:19:21 +02:00
Florian Apolloner
518af78e21
Removed unneeded smart_bytes import which was introduced in f2fff84bc
.
2012-08-15 17:33:21 +02:00
Claude Paroz
4e17f4589a
Fixed #18770 -- memcached cache backend expects byte strings as keys
...
Thanks thecore for the report.
2012-08-15 16:57:17 +02:00
Florian Apolloner
f2fff84bc3
[py3] fixed session file backend.
2012-08-15 14:20:44 +02:00
Claude Paroz
4d393e1bd9
[py3] Fixed HTTP header serialization
2012-08-15 13:39:39 +02:00
Claude Paroz
de2cb5fede
[py3] Fixed F-expression right-hand division
...
Complementary to commit 62a9ed0ac
.
2012-08-15 13:28:47 +02:00
Alex Gaynor
64a3c7f9ae
Ensured that about half of the files opened in the formtools tests were explicitly closed.
2012-08-15 03:46:32 -07:00
Claude Paroz
187ec5a166
[py3] Pass bytes to md5 in truncate_name
2012-08-15 12:37:08 +02:00
Claude Paroz
2d2dca2d8e
[py3] Fixed slugify filter
2012-08-15 12:29:10 +02:00
Anssi Kääriäinen
5d01f3caea
[py3] Removed map() calls used for side-effects only
2012-08-15 13:23:41 +03:00
Claude Paroz
f8ea12f36b
[py3] Removed excessive usage of smart_bytes
2012-08-15 12:13:54 +02:00
Alex Gaynor
ea1e8b38b3
Ensured that the archive module consistantly explicitly closed all files.
2012-08-15 02:53:40 -07:00
Florian Apolloner
ebc1325721
[py3] Always pass bytes to hashlib.md5.
2012-08-15 11:34:41 +02:00
Alex Gaynor
52c351a151
Fixed the erorr handling code for missing management commands.
2012-08-15 02:18:11 -07:00
Alex Gaynor
d1d393f975
Allow tests using a LiveServer to get closer to working.
2012-08-15 02:11:55 -07:00
Claude Paroz
e0d67f3440
[py3] Fixed test_client_regress tests
2012-08-15 10:58:26 +02:00
Claude Paroz
64531df5df
Sent got_request_exception signal before handle_uncaught_exception
...
In some cases (notably Python 3), when handle_uncaught_exception was
itself raising an exception, the got_request_exception was storing
the latter exception instead of the original exception.
2012-08-15 10:58:26 +02:00
Alex Gaynor
31ae103a15
Fixed syndication under python3.
2012-08-15 01:54:18 -07:00
Alex Gaynor
d674bd603e
Final explicit closing for staticfiles, they now pass on python3 with -Wall and there are no warnings about unclosed files
2012-08-15 01:29:05 -07:00
Alex Gaynor
20a7a244d7
Make sure to explicitly close opened files.
2012-08-15 01:21:40 -07:00
Aymeric Augustin
e091c18f50
[py3] Removed a remaining use of __metaclass__.
2012-08-14 23:45:12 +02:00
Aymeric Augustin
212a512984
[py3] Avoided the deprecated base64 interface.
...
This fixes a deprecation warning under Python 3.
2012-08-14 23:45:12 +02:00
Claude Paroz
928baee747
[py3] Fixed conditional_processing tests
2012-08-14 23:35:12 +02:00
Claude Paroz
0120985095
[py3] Fixed file_uploads tests
2012-08-14 23:35:12 +02:00
Claude Paroz
34ac145796
[py3] Fixed contrib.auth tests
2012-08-14 23:35:12 +02:00
Florian Apolloner
367bfaa522
Don't swallow AttributeError in core.urlresolvers.get_callable.
2012-08-14 21:23:25 +02:00
Aymeric Augustin
37c9318748
[py3] Fixed sitemaps tests.
2012-08-14 20:14:31 +02:00
Claude Paroz
f2fe7a3e36
[py3] Fixed serializers tests
2012-08-14 19:54:53 +02:00
Claude Paroz
7d48e077b5
[py3] Fixed staticfiles tests
2012-08-14 17:24:31 +02:00
Claude Paroz
9cb80356fc
[py3] Fed strftime with unicode on Python 3
2012-08-14 16:19:58 +02:00
Claude Paroz
c35501a128
[py3] Fixed HttpResponse when initialized with bytes
2012-08-14 16:15:50 +02:00
Alex Gaynor
a351e383b6
There's no need to do `list(dict.keys())` list(dict)` is enough.
2012-08-14 06:57:16 -07:00
Anssi Kääriäinen
4e7f04cdad
[py3] Fixed file.read().decode(), used codecs.open() instead
2012-08-14 16:09:01 +03:00
Anssi Kääriäinen
62a9ed0ac7
[py3] Fixed F-expression division operators
...
In Python 3 dividing by int will call obj.__truediv__(). This operator
was missing from F-expressions.
2012-08-14 16:07:32 +03:00
Claude Paroz
c2d59e5564
[py3] Fixed admin_views tests
...
Also changed several occurrences of 'request' to 'response'.
2012-08-14 14:45:28 +02:00
Aymeric Augustin
0c198b85a3
[py3] Replace filter/lambda by list comprehensions
...
This is more idiomatic and avoids returning a list on Python 2 and
an iterator on Python 3.
2012-08-14 14:31:06 +02:00
Aymeric Augustin
9299dc42ed
[py3] Removed unnecessary calls to .keys()
...
when computing the length of a dictionary. This fails on Python 3.
2012-08-14 14:09:23 +02:00
Aymeric Augustin
2ae58b20ec
[py3] Fixed egg template loader.
2012-08-14 12:29:53 +02:00
Aymeric Augustin
faf570df18
[py3] Compared response.content with bytes.
2012-08-14 12:29:53 +02:00
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
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
a06503d09b
[py3] Fixed content encoding in test client
...
Thanks Andrews Medina for the initial patch.
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
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
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
Claude Paroz
900816464d
[py3] Re-decoded string after idna encoding
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
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
Andrews Medina
87e0a75c03
[py3] Decoded base64-encoded hash in contrib.auth.hashers
2012-08-11 00:20:59 +02:00
Claude Paroz
92b2dec918
[py3] Made signing infrastructure pass tests with Python 3
2012-08-10 18:07:46 +02:00
Claude Paroz
751774c29f
[py3] Fixed mail tests with Python 3
2012-08-09 20:13:29 +02:00
Alex Gaynor
5f8da527ab
[py3k] use the base64 module, instead of bytes.encode('base64')
2012-08-09 07:26:11 -07:00
Aymeric Augustin
5c09c59bc7
[py3] Renamed `next` to `__next__` in iterators.
...
See PEP 3114. `next` is retained as an alias for Python 2.
2012-08-09 14:36:05 +02:00
Claude Paroz
96a6912ec5
[py3] Fixed compilemessages tests
2012-08-08 23:40:20 +02:00
Claude Paroz
180b672a65
[py3] Fixed Python 3 compatibility in localflavor forms
2012-08-08 23:22:27 +02:00
Claude Paroz
e0988ecd1e
[py3] Made Element instances hashable
2012-08-08 23:13:33 +02:00
Claude Paroz
b8e49d70f2
[py3] Replaced raw_input by input
...
The six addition has been borrowed from:
https://bitbucket.org/gutworth/six/changeset/733ef740
2012-08-08 19:53:11 +02:00
Claude Paroz
db729266d6
[py3] Fixed 'iterable but non string' detection
...
In Python 3, the str type has an __iter__ attribute. Therefore, the
presence of an __iter__ attribute is not sufficient to distinguish
'standard' iterables (list, tuple) from strings.
2012-08-08 18:02:25 +02:00
Alex Gaynor
7515f6576b
Fix TestCase.assertQuerysetEqual on python 3, this is needed for a large number of tests
2012-08-08 07:37:10 -07:00
Alex Gaynor
4c97101b1f
remove a bunch of unnescesarry iterkeys() calls
2012-08-08 07:33:15 -07:00
Claude Paroz
576ec12f8e
[py3] Replaced __nonzero__ by __bool__
...
Of course, __nonzero__ alias has been kept for Python 2 compatibility.
2012-08-08 15:02:31 +02:00
Aymeric Augustin
12cda89ffe
[py3] Fixed a loop that changed dictionary size.
2012-08-08 15:00:24 +02:00
Claude Paroz
2da3af23aa
[py3] Made gis.measure Python 3-compatible
2012-08-08 14:43:16 +02:00
Aymeric Augustin
fa4cb34817
[py3] Fixed filesystem encoding handling
...
in the app directories template loader.
2012-08-08 13:07:49 +02:00
Aymeric Augustin
a4abe7ed56
[py3] abspathu doesn't exist under Python 3.
2012-08-08 12:56:12 +02:00
Aymeric Augustin
bf4da7a442
[py3] Made a small fix in django.http.
...
This is necessary for the 'utils' tests to pass.
2012-08-07 12:00:24 +02:00
Aymeric Augustin
9e0a10ba77
[py3] Minor fix in django.contrib.gis.
2012-08-07 12:00:24 +02:00
Aymeric Augustin
64e2e35627
[py3] Ported django.utils.tzinfo.
2012-08-07 12:00:24 +02:00
Aymeric Augustin
9e8df02d68
[py3] Ported django.utils.translation.
2012-08-07 12:00:24 +02:00
Aymeric Augustin
17da0aa893
[py3] Ported django.utils.regex_helper.
2012-08-07 12:00:24 +02:00
Aymeric Augustin
fe8484efda
[py3] Ported django.utils.functional.
2012-08-07 12:00:23 +02:00
Aymeric Augustin
7e01e532c0
[py3] Ported django.utils.feedgenerator.
2012-08-07 12:00:23 +02:00
Aymeric Augustin
127b461b11
[py3] Ported django.utils.crypto.
2012-08-07 12:00:23 +02:00
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
Julien Phalip
01c392623d
Fixed #10057 -- Ensured that the 'show_delete' context variable in the admin's change view actually controls the display of the delete button. Thanks to rajeesh for the report, to patcoll for the patch, and to David Gouldin for the test.
2012-07-21 18:10:24 -07:00
Ramiro Morales
ea667ee3ae
Made LiveServerTestCase to restore state on exit.
...
The piece of state is DB connections' allow_thread_sharing attribute
which gets munged test are run when in-memory SQLite databases.
Thanks Anssi for suggesting the possible root cause and Julien for
implementing the fix.
2012-07-21 20:16:47 -03:00
Julien Phalip
2b6644388f
Fixed an `except` statement to be Python3-compatible. Thanks to charettes for the tip.
2012-07-21 15:13:55 -07:00
Aymeric Augustin
4ceb9db9d8
Removed u prefix on a unicode string.
2012-07-21 22:38:25 +02:00
Julien Phalip
1af0271d7c
Fixed #6170 -- Ensured that a useful exception is raised when a regex is invalid in the URLConf.
...
Thanks to abrahamson.j for the report, to guettli for initial work on the patch, and to David Gouldin for the new patch and test.
2012-07-21 13:30:34 -07:00
Claude Paroz
423244bc6b
Fixed #4680 -- Improved initial_sql parsing
...
In particular, allow the '--' sequence to be present in string
values without being interpreted as comment marker.
Thanks Tim Chase for the report and shaleh for the initial patch.
2012-07-21 14:24:29 +02:00
Claude Paroz
32a4df6c55
Fixed #18395 -- Reset language-related global variables with setting_changed
2012-07-21 13:49:07 +02:00
Aymeric Augustin
38c18f1747
Switched to octal notation (bis).
2012-07-20 13:42:44 +02:00
Aymeric Augustin
324d48d0a7
Switched to Python 3-compatible octal notation.
2012-07-20 13:28:36 +02:00
Aymeric Augustin
5d560dcb98
Fixed #18504 -- Computed |naturalday in local time.
2012-07-19 23:02:22 +02:00
Aymeric Augustin
123362dd37
Fixed #18608 -- Reduced monkey-patching in tests.
...
Thanks Claude Paroz for the patch.
2012-07-19 20:02:20 +02:00
Claude Paroz
c54905b359
Fixed #18479 -- Stopped makemessages raising error on gettext warnings
...
Thanks Niels Busch for the initial patch.
2012-07-18 20:43:35 +02:00
Mike Grouchy
a2e927b7ed
BaseCache now has a no-op close method as per ticket #18582
...
Also removed the hasattr check when firing request_finished signal for
caches with a 'close' method. Should be safe to call `cache.close`
everywhere now
2012-07-18 14:16:55 -04:00
Aymeric Augustin
1e89a208d0
Fixed #18645 -- Clarified filesizeformat implementation
...
Thanks Jérôme Renard for the patch.
2012-07-18 15:01:12 +02:00
Claude Paroz
8184aff2b0
Fixed #18547 -- Improved error message when gettext is missing
2012-07-17 22:04:47 +02:00
Claude Paroz
23f94f0741
Fixed #18561 -- Made HttpResponse.tell() support non-ascii chars
2012-07-17 22:00:54 +02:00
Alex Gaynor
110c729309
Merge pull request #215 from mgrouchy/add-interpreter-options
...
Adds interpreter option to shell command as per ticket #18639
2012-07-17 11:04:59 -07:00
Mike Grouchy
f2abfe1e48
Adds interpreter option to shell command as per ticket #18639
...
Specify python interpreter interface ipython or bpython with the -i,
--interface options
argument.
ex// python manage.py shell -i bpython
ex// python manage.py shell --interface bpython
Like all other options, defaults to default python interpreter when your
selected choice isn't available.
updated documentation where appropriate
2012-07-17 13:45:35 -04:00
Vebjorn Ljosa
d5012d6371
Fixed #18644 -- Made urlize trim trailing period followed by parenthesis
2012-07-17 12:44:02 -04:00
Alex Gaynor
52df0d50b0
Switched to use a more idiomatic construct.
2012-07-17 07:01:01 -07:00
Anssi Kääriäinen
29132ebdef
Fixed #17788 -- Added batch_size argument to qs.bulk_create()
...
The qs.bulk_create() method did not work with large batches together
with SQLite3. This commit adds a way to split the bulk into smaller
batches. The default batch size is unlimited except for SQLite3 where
the batch size is limited to 999 SQL parameters per batch.
Thanks to everybody who participated in the discussions at Trac.
2012-07-17 15:24:41 +03:00
Anssi Kääriäinen
fcad6c48f0
Fixed #17497 -- Corrected FieldError message in add_fields()
...
The erroneous message was user visible in values_list() calls.
Thanks to ojii for report and review, and to antoviaque for the patch.
2012-07-17 12:49:46 +03:00
Anssi Kääriäinen
aeda55e6bf
Fixed #3881 -- skip saving session when response status is 500
...
Saving session data is somewhat likely to lead into error when the
status code is 500. It is guaranteed to lead into error if the reason
for the 500 code is query error on PostgreSQL.
2012-07-16 20:57:55 +03:00
Nuno Maltez
bebbbb7af0
Fixed #18056 - Cleared aggregations on DateQuery.add_date_select
...
Cleared aggregations on add_date_select method so only distinct dates
are returned when dealing with a QuerySet that contained aggregations.
That would cause the query set to return repeated dates because it
would look for distinct (date kind, aggregation) pairs.
2012-07-16 19:52:31 +03:00
Claude Paroz
35ddeee455
Removed debugging line left in previous commit
2012-07-15 21:19:23 +02:00
Claude Paroz
cdcdd131da
Dropped support for GDAL < 1.5
...
GDAL 1.5 has been released in December 2007.
2012-07-15 21:10:32 +02:00
Alex Gaynor
c57abd3c29
Remove DotExpandedDict, which was undocumented and unused.
2012-07-14 19:04:37 -07:00
Alex Gaynor
0f57935bcd
Fix an incredibly emberassing typo.
2012-07-14 17:08:52 -07:00
Alex Gaynor
8b3c2f2c51
Deprecate two methods (which I seriously doubt anyone ever used, but they were documented so...) because they cannot be implemented efficiently on top of collections.SortedDict in Python 2.7 and up.
2012-07-14 16:08:42 -07:00
Alex Gaynor
9877d25dc6
Switched from usign a method that was about to be deprecated to normal code.
2012-07-14 16:02:30 -07:00
Alex Gaynor
3e8d8bb094
Fixed auth to not use an internal implementation detail of SortedDict
2012-07-14 14:33:13 -07:00
Alex Gaynor
8f002867b2
Cleaned up the QueryDict implementation.
...
- Use super().
- Don't poke at internals.
- Don't override methods for no reason.
2012-07-14 14:07:11 -07:00
Aymeric Augustin
9a25d8618a
Update links to diveintomark.org.
...
These pages are gone.
2012-07-14 12:32:39 +02:00
Alex Gaynor
fb8ec2855b
Remove some code that has been dead since newforms-admin was merged, many moons ago.
2012-07-12 09:27:08 -07:00
Alex Gaynor
76d5daa60f
Changed `manage.py shell`'s help text to reflect that it can invoke bpython.
2012-07-10 14:26:42 -07:00
Claude Paroz
828f7b62e8
Fixed #18602 -- Improved error message when database NAME is missing
...
Thanks Kristian Glass for the report.
2012-07-10 13:22:55 +02:00
Claude Paroz
d9db1d3373
Added supplementary check for CUIT number of ar localflavor
...
Thanks Kevin Schaul for the initial patch.
2012-07-09 14:10:54 +02:00
Claude Paroz
1d2982362d
Fixed #18537 -- Fixed CUIT calculation in ar localflavor
...
Thanks mmoya at 8ksoft.com.ar for the report and Kevin Shaul for the
initial patch.
2012-07-09 14:10:54 +02:00
Claude Paroz
146aff3bac
Fixed #18590 - Reverted Python 2.4 workaround for Model pickling
...
Revert of 08d521efa0
. Refs #10547 , #12121 .
Thanks Michal Petrucha for the report.
2012-07-08 20:08:28 +02:00
Jannis Leidel
1aa0d8ac4d
Fixed #18487 -- Made sure that protocol-relative URLs aren't processed by the cached staticfiles storage. Thanks to LukaszBalcerzak for the patch.
2012-07-08 18:25:12 +02:00
Jannis Leidel
3047981517
Fixed #18050 -- Fixed a rather glaring bug in the handling of @import statements when using the cached staticfiles storage.
2012-07-08 18:17:53 +02:00
Jannis Leidel
effc2cad95
Merge branch 'master' of github.com:django/django
2012-07-08 12:57:04 +02:00
Jannis Leidel
3727f6d096
Fixed #18430 -- Use the FILE_CHARSET setting when reading from a file during post processing with the cached staticfiles storage. Thanks to Brant Young for initial debugging.
2012-07-08 12:56:49 +02:00
Julien Phalip
8015593bc1
Fixed #17978 -- Fixed a minor layout issue when an inline contains a filter horizontal widget. Thanks to Aymeric Augustin for the report.
2012-07-07 15:41:04 -07:00
Florian Apolloner
a4bb7dd552
Merge branch 'master' of github.com:django/django
2012-07-07 15:49:00 +02:00
Jannis Leidel
0a68a2994b
Fixed #18254 -- Added ability to the static template tags to store the result in a contextt variable. Many thanks to Andrei Antoukh for the initial patch.
2012-07-07 15:30:25 +02:00
Florian Apolloner
52a9e15794
Fixed a regression in the user admin page introduced in a92e7f37c4
.
...
a92e7f37c4
switched most of the internal stuff
to format_html. Using format_html in the `render` method of
`ReadOnlyPasswordHashWidget` caused it to generate `SafeString` instances.
Later these safe strings where returned from `BoundField.__unicode__` which
caused force_unicode to loose the "safe" information. This commit fixes that by
ensuring that the render method returns `SafeUnicode` instead of `SafeString`.
2012-07-07 15:29:20 +02:00
Claude Paroz
8dafd04c45
Fixed #17257 - Removed outdated comment in syndication view
...
Thanks krzysiumed for the patch.
2012-07-07 11:34:04 +02:00
Adrian Holovaty
8855f9380e
Merge pull request #176 from benspaulding/ticket_18521
...
Add reST role to templates named in some view docs.
2012-07-06 12:46:26 -07:00
Guilherme Gondim
91e4f7effb
Fix copyright holder
2012-07-06 15:24:07 -03:00
Luke Plant
2ba4278cb3
Fixed #18484 - 'display:none' on CSRF token div is redundant and causes problems with some browsers
...
Thanks to hedleyroos for the report
2012-07-06 15:33:29 +01:00
Luke Plant
8fdc56d2a6
Fixed #18572 - Python26 string format incompatibility
...
Thanks to anonymous/AeroNotix for the report
2012-07-06 00:23:02 +01:00
Anssi Kääriäinen
d3c2eb103f
Fixed #18330 - Made cache culling 3rd party db backend friendly
...
This is Ian Kelly's patch from #15580 with minor modifications.
2012-07-05 17:20:48 +03:00
Andrei Antoukh
0f49b2bce2
Fixed #18362 - Made model.save() update_fields accept attnames
2012-07-05 16:43:28 +03:00
kspi
581a36245c
Correct Lithuanian short date format.
2012-07-04 22:43:31 +03:00
Luke Plant
a222d6e800
Fixed incorrect URL to object on delete confirmation and history page
2012-07-03 22:20:12 +01:00
Luke Plant
b0eee0ba4b
Removed various unnecessary instances of mark_safe applied to URLs
...
Also fixed some test breakages introduced in last commit
2012-07-03 22:20:12 +01:00
Luke Plant
a92e7f37c4
Changed a lot of internal code to use 'format_html' where appropriate/possible
2012-07-03 22:20:12 +01:00
Luke Plant
bee498f3a2
Added 'format_html' utility for formatting HTML fragments safely
2012-07-03 22:20:12 +01:00
Luke Plant
f33e150369
Documented utils.html.escape and conditional_escape
2012-07-03 22:20:12 +01:00
Anssi Kääriäinen
ab7f071058
Fixed comment wording in sql/where.py
...
Thanks to Simon Charette for noticing this.
2012-07-03 10:31:06 +03:00
Julien Phalip
2cd4cf58d3
Fixed #18550 -- Ensured that the admin history view works with escaped primary keys.
...
Thanks to josh.oosterman for the report and patch.
2012-07-01 18:40:50 -07:00
Anssi Kääriäinen
e74787391e
Fixed a regression introduced in where.as_sql() refactor
...
At least Oracle needs parentheses in negated where conditions, even if
there is only single condition negated. Fixed this by reverting to old
logic in that part of as_sql() and adding a comment about this.
I did not investigate why the parentheses are needed. The original
offending commit was bd283aa844
.
2012-07-01 22:52:35 +03:00
Anssi Kääriäinen
f572ee0c65
Fixed #16047 -- Restore autocommit state correctly on psycopg2
...
When the postgresql_psycopg2 backend was used with DB-level autocommit
mode enabled, after entering transaction management and then leaving
it, the isolation level was never set back to autocommit mode.
Thanks brodie for report and working on this issue.
2012-07-01 19:36:43 +03:00
Anssi Kääriäinen
da573fbb41
Fixed some locations to work with autocommit=True
...
- backends: supports_transactions()
- select_for_update tests
2012-07-01 19:27:36 +03:00
Anssi Kääriäinen
bd283aa844
Refactored the empty/full result logic in WhereNode.as_sql()
...
Made sure the WhereNode.as_sql() handles various EmptyResultSet and
FullResultSet conditions correctly. Also, got rid of the FullResultSet
exception class. It is now represented by '', [] return value in the
as_sql() methods.
2012-07-01 17:21:34 +03:00
Anssi Kääriäinen
2b9fb2e644
Fixed #18251 -- Removed a deadlock possibility in apploading
...
Thanks to harm for the report and comments.
2012-07-01 16:14:27 +03:00
Claude Paroz
da200c5e35
Fixed #16519 -- Deprecated mimetype kwarg of HttpResponse __init__
...
This keyword was already deprecated in the code (supported for
backwards compatibility only), but never formally deprecated.
Thanks Paul McMillan for the report and yasar11732 for the initial
patch.
2012-06-30 21:27:47 +02:00
Claude Paroz
deed192dda
Removed usage of mimetype kwarg of HttpResponse
...
Refs #16519 .
2012-06-30 21:19:07 +02:00
Claude Paroz
2c2c8a6326
Isolated sitemaps test from ABSOLUTE_URL_OVERRIDES
...
Refs #15988 .
2012-06-30 18:50:28 +02:00
Claude Paroz
db87016b1a
Fixed #12493 -- Deprecated auto-correction of TEMPLATE_DIRS
2012-06-30 15:06:42 +02:00
Claude Paroz
47da7b7a9a
Fixed #18102 -- Defined min/max_length on French localflavor form fields
...
Thanks mothsART for the report and the initial patch.
2012-06-30 13:18:07 +02:00
Claude Paroz
26cb227cfe
Fixed #15197 -- Fixed yaml serialization into HttpResponse
...
Thanks fourga38 for the report and hirokiky at gmail.com for the
initial patch.
2012-06-28 16:29:29 +02:00
Ben Spaulding
24dec9edaa
Add reST role to templates named in some view docs.
...
This makes the templates link up correctly in the admindocs.
2012-06-26 21:45:45 -05:00
Josh Smeaton
fa182e8ae8
Fixed #18465 -- Set date formats correctly on Oracle
...
Correctly configure NLS_SESSION_PARAMETERS to format Date and DateTime
on Oracle backend.
Thanks to Josh Smeaton for report & patch.
2012-06-26 19:39:14 +03:00
Claude Paroz
05d333ba3b
Fixed #18515 -- Conditionally regenerated filename in FileField validation
...
When a FileField value has been saved, a new validation should not
regenerate a new filename when checking the length. Refs #9893 .
2012-06-26 18:18:44 +02:00
Anssi Kääriäinen
b6c356b7bb
Fixed #17485 -- Made defer work with select_related
...
This commit tackles a couple of issues. First, in certain cases there
were some mixups if field.attname or field.name should be deferred.
Field.attname is now always used.
Another issue tackled is a case where field is both deferred by
.only(), and selected by select_related. This case is now an error.
A lot of thanks to koniiiik (Michal Petrucha) for the patch, and
to Andrei Antoukh for review.
2012-06-26 18:08:42 +03:00
Claude Paroz
5318783027
Fixed #17966 -- Isolated ProfileTestCase from custom AUTH_PROFILE_MODULE
...
Thanks Rob Golding for helping on the patch.
2012-06-25 20:26:17 +02:00
Claude Paroz
4b722b31e1
Fixed #16317 -- Fixed dumpdata for self-referencing models and natural keys
...
Thanks aldaran for the patch.
2012-06-24 19:54:56 +02:00
Alex Gaynor
e0fce8706d
Switch to using context managers for acquiring and releasing locks.
2012-06-23 08:11:15 -07:00
Alex Gaynor
e1b74d0094
Don't use a list comprehension when we don't need the resulting list.
2012-06-23 07:54:45 -07:00
Dmitry Medvinsky
d4da08375b
Fixed #18454 -- Added ability to pass a list of signals to `receiver`.
...
Added ability to use receiver decorator in the following way:
@receiver([post_save, post_delete], sender=MyModel)
def signals_receiver(sender, **kwargs):
...
2012-06-23 16:31:16 +02:00
Florian Apolloner
7f225880e4
Corrected the `instance_dict` description for form wizards.
2012-06-22 15:46:49 +02:00
Florian Apolloner
6bc1b22299
Fixed our HTMLParser patches for python 2.7.4
2012-06-22 15:09:26 +02:00
Luke Plant
a54a8bab0c
Fixed #17776 - DoesNotExist is not picklable
...
Thanks to ambv for the report
2012-06-22 13:28:15 +01:00
Claude Paroz
41eb70f762
Fixed #15271 -- Defined a to_python method for GeometryField
...
Thanks volrath and copelco for their work on the patch.
2012-06-19 14:55:40 +02:00
danger
45a1a54b0b
Added support for gdal 1.9.
2012-06-19 11:33:27 +02:00
Chris Beaven
c57ba67331
Fixed #14502 again -- saner verbatim closing token
...
Previously, the closing token for the verbatim tag was specified as the
first argument of the opening token. As pointed out by Jannis, this is
a rather major departure from the core tag standard.
The new method reflects how you can give a specific closing name to
{% block %} tags.
2012-06-19 10:49:33 +12:00
Daniel Hepper
aee9eecb92
Fixed #18444 -- Replace hard coded "View on Site" URLs
2012-06-18 18:12:29 +02:00
Daniel Hepper
108f8dddea
Fixed #18450 -- Removed default values for i18n JavaScript URLs in Admin templates
2012-06-18 18:09:05 +02:00
Florian Apolloner
ac1b9ae630
Fixed GIS testsuite.
...
Moved HAS_SPATIALREFSYS back into the tests namespace since it only operates
on the default database and isn't a global flag like HAS_GDAL.
2012-06-17 11:39:02 +02:00
Julien Phalip
d708298184
Fixed #18420 -- Prevented the admin JS from crashing when the main form contains no field. Thanks to maciej.maciaszek for the report and patch.
2012-06-16 17:18:23 -07:00
Julien Phalip
fadcc6ddb7
Updated the admin's minified JS files.
2012-06-16 16:23:39 -07:00
Julien Phalip
1ace912f7e
Fixed #18477 -- Fixed colspan value when a TabularInline form contains validation errors. Thanks to yedpodtrzitko for the report and patch.
2012-06-16 14:29:41 -07:00
Julien Phalip
1794e36fa1
Skip GeometryFieldTest if there's no spacial database.
2012-06-16 13:57:33 -07:00
Claude Paroz
5bdd0d6b6a
Favored text (StringIO) over binary content for deserialization
...
This is also more Python 3 compatible, as the json module in
Python 3 is expecting text. Thanks Vinay Sajip for noticing it.
2012-06-15 14:49:19 +02:00
Luke Plant
fd6a9d35d9
IfParser.next() method renamed to avoid confusion with iterator protocol.
2012-06-14 23:12:15 +01:00
Luke Plant
edee20ff50
Reverted part of 169b1a40
which was mistakenly applied to a non-iterator class.
...
Doing next(IfParser()) works for Python 2.7, because it calls
IfParser.next(), but in Python 3 will call IfParser.__next__() which does
not work since it is not an iterator and does not have that method.
2012-06-14 23:12:15 +01:00
Claude Paroz
023b70415b
Executed SpatialRefSysTest only with spatial backend
2012-06-14 21:44:08 +02:00
Claude Paroz
88601bad84
Discovered some geodjango tests with standard mechanism
...
No need to special case tests discovery for regular first-level
gis tests.
2012-06-14 21:10:30 +02:00
Claude Paroz
4d46106f8c
Fixed #17754 -- Refactored gis.measure
...
This refactoring does allow much easier MeasureBase subclassing.
Many thanks to Ricardo di Virgilio for the initial patch.
2012-06-14 15:32:42 +02:00
Claude Paroz
fe873e2765
Fixed #12140 -- Fixed http.urlencode result for empty lists
...
Thanks aneil for the report and the initial patch.
2012-06-14 11:32:40 +02:00
Anssi Kääriäinen
86c20e39eb
Fixed connection.queries encoding handling on Oracle
...
In addition, removed a possibly problematic .filter() call from
backends.test_query_encoding test. It is possible the .filter could
cause collation problems on MySQL, and as it wasn't absolutely needed
for the test it seemed better to get rid of the call.
Refs #18461 .
2012-06-13 14:16:34 +03:00
Claude Paroz
e9ef9776d1
Fixed #18461 -- Ensured that last_executed_query returns Unicode
...
Thanks Anssi Kääriäinen for the review.
2012-06-13 12:04:46 +02:00
Claude Paroz
35f9c2c07a
Cleaned up locale-related encoding issues
2012-06-12 14:23:41 +02:00
Claude Paroz
3dd5d726d1
Fixed #18463 -- Forced type() argument to be a byte string
2012-06-11 22:14:06 +02:00
Jannis Leidel
c4c7fbcc0d
Fixed #18451 -- Vastly improved class based view documentation.
...
Many thanks to Daniel Greenfeld, James Aylett, Marc Tamlyn, Simon Williams, Danilo Bargen and Luke Plant for their work on this.
2012-06-11 10:40:23 +02:00
Claude Paroz
1a10a06b9f
Fixed #18457 -- Fixed encoding error in yaml deserializer
...
Thanks jpaugh64 for the report.
2012-06-10 19:56:16 +02:00
Luke Plant
e9497a3803
Corrected way to get URL of object in admin history template
2012-06-10 06:18:16 +01:00
Claude Paroz
fc40a6504b
Fixed #17159 -- Validated returned number of next|previous_page_number
...
Thanks mehta.apurva at gmail.com for the report and the initial patch
and neaf for the complete patch.
2012-06-09 17:55:24 +02:00
Claude Paroz
ad47364dd3
Reverted 905e33f
, now that DatabaseFeatures does not need confirm
...
Connection.features does not need to be confirmed any more, after
commit aa42357
, rendering obsolete the workaround when using
TEST_MIRROR (Refs #16885 , #17760 ).
2012-06-09 17:05:54 +02:00
Claude Paroz
aa423575e7
Fixed #17760 -- Implemented callable database features as cached properties
...
This does remove the requirement to call features.confirm() method
before checking the properties.
Thanks cdestiger and Ramiro Morales for their work on the patch.
2012-06-09 15:59:52 +02:00
Anssi Kääriäinen
484fcd34a4
Fixed #16418 -- Made generic views work with ModelForms
...
Generic views assumed any object's _meta will be model Options. This
is not true for ModelForms for example. Took isinstance(obj, Model)
in use instead.
2012-06-09 01:12:14 +03:00
Anssi Kääriäinen
a035d9d650
Cleaned whitespace errors introduced in previous commit
2012-06-08 23:52:43 +03:00
Simon Charette
b6d533af4d
Fixed #18399 – Added a way to get ContentTypes for proxy models
...
Added kwargs for_concrete_model and for_concrete_models to ContentType
methods get_for_model() and get_for_models(). By setting the flag to
False, it is possible to get the contenttype for proxy models.
2012-06-08 23:07:58 +03:00
Anssi Kääriäinen
90985048fc
Used git log instead of git show for last commit's timestamp
...
The reason for this was that git show included the whole changeset in
the output, but only the UTC timestamp was needed. By using git log
it is possible to get just the timestamp. The whole changeset can be
large, and can cause unicode encoding errors.
2012-06-08 23:04:03 +03:00
Aymeric Augustin
23d230f058
Merge pull request #123 from apollo13/ticket18381
...
Fixed #18381 -- Stopped escaping object ids
when passing them to the contenttypes.shortcut view.
Thanks apollo13 for the patch and dhepper for the review.
2012-06-08 01:48:41 -07:00
Daniel Hepper
0ae727beda
Fixed #18433 -- Fixed "View on Site" link in inline admin for models with custom PK
2012-06-07 21:08:36 +02:00
Jann Kleen
1a412dda62
Fixed #18432 -- Prevented the ForeignKey field from creating an invalid query when chained. Thanks, Jann Kleen.
2012-06-07 18:49:19 +02:00
Claude Paroz
5e6ded2e58
Fixed #18363 -- Added Python 3 compatibility layer.
...
Thanks Vinay Sajip for the support of his django3 branch
and Alex Gaynor, kezabelle, YorikSar for the review.
2012-06-07 18:36:53 +02:00
Claude Paroz
4a103086d5
Fixed #18269 -- Applied unicode_literals for Python 3 compatibility.
...
Thanks Vinay Sajip for the support of his django3 branch and
Jannis Leidel for the review.
2012-06-07 18:08:47 +02:00