Luke Plant
f5ce1793a8
Small cleanup in prefetch_related code
2012-06-06 14:19:06 +01:00
Luke Plant
4fea46a030
Fixed #18309 - Prefetch related does not work for fkey to multitable inherited model
...
Thanks to milosu for the report, tests and initial patch.
2012-06-06 14:17:32 +01:00
Claude Paroz
f0664dc8ae
Made TestNoInitialDataLoading pass with MySQL (Refs #15926 )
2012-06-06 13:54:40 +02:00
Claude Paroz
70a0351fef
Fixed #18184 -- Moved algorithm identification code to hashers module
...
Thanks Eli Collins for the report and the patch.
2012-06-06 11:06:33 +02:00
Claude Paroz
eb286aa22f
Delayed encoding of password and salt in password checking.
...
Applied the rule that string encoding should happen as late as
possible. This is also a preparation for Python 3 compatibility.
2012-06-06 10:53:16 +02:00
Claude Paroz
9c096ab981
Fixed #17328 -- Added OpenLayersWidget _has_changed method
...
Thanks Will Hardy for the report and the patch.
2012-06-06 10:42:14 +02:00
Claude Paroz
17824e2b74
Fixed #17736 -- Kept maximal floating-point accuracy in from_bbox
...
When constructing a polygon with Polygon.from_bbox, do not convert
parameters to strings at this stage (str defaults to 12 significant
digits).
Thanks tdihp@hotmail.com for the report and David Eklung for the patch.
2012-06-06 10:09:32 +02:00
Honza Kral
fedac99c85
Fixed #15926 -- Added option --no-initial-data to syncdb and flush.
...
Thanks msiedlarek, jpaugh64 and vlinhart!
2012-06-05 16:46:15 +02:00
martin.bohacek
eee791e9b2
Merge branch 'master' of https://github.com/django/django
2012-06-05 13:29:33 +02:00
martin.bohacek
fbb7389439
Ticket #17804 fix.
2012-06-05 13:28:32 +02:00
Claude Paroz
5ef599c7b3
Used skipUnless decorator to skip tests in geos tests.
2012-06-04 20:39:54 +02:00
Julien Phalip
f699641161
Fixed #17138 -- Made the sensitive_variables decorator work with object methods.
2012-06-03 23:44:13 -07:00
Samuel Sutch
43a46e9004
Remove the summary attribute of the table
...
In the discussion here: https://code.djangoproject.com/ticket/17138
it was decided that using the caption for this previously
non-visible part of the table element was not semantic, so in this
patch is moves that summary to the `title` attribute of the `a`
tag which when overed over, on most browsers, will show the text.
2012-06-03 12:44:37 -07:00
Claude Paroz
6522283a71
Fixed #14478 -- Isolated messages tests from custom TEMPLATE_CONTEXT_PROCESSORS
2012-06-02 21:28:18 +02:00
Claude Paroz
7676d6e764
Made sitemaps tests use override_settings. Refs #14478
2012-06-02 21:24:18 +02:00
Ramiro Morales
72130385bf
Made inspectdb tests deal with a smaller generated models.py file.
...
Implemented this by adding a stealth table_name_filter option for the
command.
2012-06-01 21:46:07 -03:00
Aymeric Augustin
939af5a654
Fixed a typo in a comment. Refs #17742 .
2012-06-01 08:09:58 +02:00
Julien Phalip
f6fc83c975
Fixed #18409 -- Made RegexField work with unicode characters.
2012-05-31 11:45:35 -07:00
Jens Page
ba10be7032
Fixed #18408 -- Isolated flatpages tests from existing sites.
...
Resolves Flatpages test issues by:
- Creating an example_site fixture
- Overriding project SITE_ID setting to 1
- Normalizing the use of the hardcoded (1) site_id to settings.SITE_ID
2012-05-31 18:03:49 +02:00
Claude Paroz
0dc904979d
Fixed #18407 -- Made model field's to_python methods fully accept unicode.
...
When generating error message in to_python, any unicode string
containing non-ascii characters triggered a UnicodeEncodeError for
most field types.
2012-05-31 16:46:07 +02:00
Claude Paroz
2626ea4a74
Fixed #14681 -- Do not set mode to None on file-like objects.
...
gzip.GzipFile does not support files with mode set to None.
2012-05-31 10:02:35 +02:00
Julien Phalip
4b28ea37e5
Merge pull request #94 from jphalip/tickets/18393-blocktrans-valueerror
...
Fixed #18393 -- Prevented blocktrans to crash when a variable name is badly formatted.
2012-05-29 22:47:08 -07:00
Claude Paroz
28e424532f
Removed unneeded smart_str in cache utils.
2012-05-28 21:13:09 +02:00
Julien Phalip
432339a72c
Fixed #18393 -- Prevented blocktrans to crash when a variable name is badly formatted.
2012-05-28 11:03:34 -07:00
Claude Paroz
a768b1d94a
Removed numbering of GEOS tests.
2012-05-28 11:15:31 +02:00
Claude Paroz
cc4b4d9fd3
Used CommandError in createcachetable command.
...
Raising CommandError whenever a management command meets an error
condition is the standard way to handle errors in commands.
2012-05-27 23:03:21 +02:00
Claude Paroz
f2b6763ad7
Fixed #18387 -- Do not call sys.exit during call_command.
...
Moved sys.exit(1) so as failing management commands reach it
only when running from command line.
2012-05-27 20:38:47 +02:00
Michael Newman
4423757c0c
Fixed #18135 -- Close connection used for db version checking
...
On MySQL when checking the server version, a new connection could be
created but never closed. This could result in open connections on
server startup.
2012-05-27 18:45:08 +03:00
Anssi Kääriäinen
a8a81aae20
Fixed #18343 -- Cleaned up deferred model implementation
...
Generic cleanup and dead code removal in deferred model field loading
and model.__reduce__().
Also fixed an issue where if an inherited model with a parent field
chain parent_ptr_id -> id would be deferred loaded, then accessing
the id field caused caused a database query, even if the id field's
value is already loaded in the parent_ptr_id field.
2012-05-27 18:11:13 +03:00
Claude Paroz
12f4bd74fc
Removed unneeded sys import added in previous commit
2012-05-26 11:53:33 +02:00
Claude Paroz
3b5083bee5
Fixed #5423 -- Made dumpdata output one row at a time.
...
This should prevent storing all rows in memory when big sets of
data are dumped.
See ticket for heroic contributors.
2012-05-26 11:43:37 +02:00
Claude Paroz
c2139bbcef
Updated WMS URL in geoadmin test.
2012-05-26 00:02:15 +02:00
Claude Paroz
ce8f874b88
Fixed #14886 -- Added wms_options dict to GeoModelAdmin.
...
It is now possible to set WMS options by overriding wms_options
in a subclass of GeoModelAdmin.
Thanks slinkp for the report and the initial patch.
2012-05-25 21:00:44 +02:00
Claude Paroz
edfa95c22f
Specified when open should use binary mode.
...
Thanks Vinaj Sajip for the help of his django3 branch.
2012-05-25 20:43:43 +02:00
Aymeric Augustin
e73838b6dd
Fixed #17371 -- Made the test client more flexible
...
The OPTIONS, PUT and DELETE methods no longer apply arbitrary
data encoding (in the query string or in the request body).
2012-05-25 19:03:15 +02:00
Claude Paroz
2042f537a6
Removed unneeded smart_str in generic views.
2012-05-24 23:55:50 +02:00
Anssi Kääriäinen
8c72aa2379
Fixed qs.order_by() join promotion for already existing joins
...
When order_by causes new joins to be added to the query, the joins must
be LEFT OUTER joins for nullable relations, otherwise the order_by
could cause the results to be altered. This commit fixes the logic to
only promote new joins, previously all joins in the order_by lookup
path were promoted.
Thanks to Bruno Desthuilliers for spotting this corner case.
2012-05-24 18:42:06 +03:00
Claude Paroz
2daf1ae8b9
Stopped converting match dict keys to bytestrings when resolving URLs.
...
Test suite is passing, but if any regression would be detected,
we might replace smart_str by force_unicode.
2012-05-24 13:51:18 +02:00
Aymeric Augustin
1e6c3368f2
Fixed #18177 -- Cached known related instances.
...
This was recently fixed for one-to-one relations; this patch adds
support for foreign keys. Thanks kaiser.yann for the report and
the initial version of the patch.
2012-05-24 13:25:01 +02:00
Aymeric Augustin
3b2993ed04
Fixed #18353 -- Inconsistency in date-based CBVs.
2012-05-24 13:02:19 +02:00
Claude Paroz
f4abba5200
Fixed #18367 -- Allowed LayerMapping to store strings in TextField.
...
Thanks geoffhing@gmail.com for the report.
2012-05-24 09:57:22 +02:00
Claude Paroz
f1ebcdc7c2
Modernized contrib.gis layermapping tests.
...
In particular, make tests independent of each other.
2012-05-24 09:52:06 +02:00
Claude Paroz
817535d73e
Replaced types.NoneType occurrences
...
In Python 3, types.NoneType is no more available.
2012-05-23 12:20:03 +02:00
Anssi Kääriäinen
0df4593f0e
Fixed #18319 -- Added 'supports_sequence_reset' DB feature
...
Added a new feature to allow 3rd party backends to skip tests which
test sequence resetting.
Thanks to manfre for report and patch.
2012-05-22 23:51:05 +03:00
Claude Paroz
df7a65ac4b
Replaced 'next' testing by collections.Iterator testing.
...
The new construct is also Python 3 compatible (where 'next' has
been renamed to '__next__').
2012-05-22 20:37:38 +02:00
Anssi Kääriäinen
d5c7f9efc3
Fixed #18304 -- Optimized save() when update_can_self_select=False
...
Databases with update_can_self_select = False (MySQL for example)
generated non-necessary queries when saving a multitable inherited
model, and when the save resulted in update.
2012-05-22 20:59:33 +03:00
Claude Paroz
ed7ea5a602
Fixed #18113 -- Corrected get_template_names docstrings.
...
Thanks Keryn Knight for the report.
2012-05-22 13:15:28 +02:00
Jannis Leidel
23b9418458
Regenerated the minified versions of the admin actions and admin inlines JavaScript files forgotten in 04785d2
and f92c7c5
(and previous).
2012-05-20 18:23:14 +02:00
Aymeric Augustin
03f86a5adb
Fixed #18354 -- Performance issue in CBV.
...
Prevented repeating a query twice when the model isn't ordered by
-date_field (in Meta), allow_empty is False and pagination isn't
enabled.
2012-05-20 13:18:42 +02:00
Claude Paroz
35e6585568
Imported reduce from functools for forward compatibility.
...
In Python 3, reduce has to be imported from functools.
2012-05-20 00:25:46 +02:00