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
Claude Paroz
38408f8007
Marked bytestrings with b prefix. Refs #18269
...
This is a preparation for unicode literals general usage in
Django (Python 3 compatibility).
2012-05-19 17:43:34 +02:00
Claude Paroz
822d6d6dab
Fixed #18325 -- Wrapped self.stdout/stderr in OutputWrapper class
2012-05-19 13:51:54 +02:00
Claude Paroz
078ea51b1c
Fixed test failures after commit 1a66f53
. Refs #18340
2012-05-19 12:32:59 +02:00
Claude Paroz
1a66f53f94
Fixed #18340 -- Fixed formtools form_hmac with Unicode input
...
Using cPickle, two apparently identical Unicode strings could
generate different pickled results depending on previous operations
on those strings.
2012-05-19 12:10:22 +02:00
Adrian Holovaty
04785d2697
Merge pull request #24 from marcneuwirth/master
...
Removed 'return false' in favor of preventDefault in admin JS.
2012-05-18 13:41:53 -07:00
Adrian Holovaty
4b75546b45
Merge pull request #70 from tswicegood/fix-js-scope
...
Cleaned up various JavaScript in admin JS.
2012-05-18 13:37:41 -07:00
Claude Paroz
91727c76cd
Cleaned up WSGIRequestHandler get_environ to be Python 3 compatible
...
headers.type/typeheader attributes are gone in Python 3. Thanks
Vinay Sajip for the inspiration of his Python 3 branch.
2012-05-18 19:40:41 +02:00
Claude Paroz
02eca6c0e2
Added more relative imports in contrib.gis.
2012-05-18 17:06:25 +02:00
Claude Paroz
d04f72fb31
Got rid of old __cmp__methods replaced by rich comparison.
...
The __cmp__ methods are unsupported in Python 3.
_doctest.py has been left untouched because it is likely it will
not be migrated to Python 3.
2012-05-18 14:52:24 +02:00
Claude Paroz
7549de841c
Fixed #18334 -- Fixed detection of supports_stddev backend feature.
...
Thanks to Michael Manfre for the report and Anssi Kääriäinen for the
review.
2012-05-18 12:12:45 +02:00
Aymeric Augustin
4774875896
Fixed #6916 -- Wrong spelling of Spanish province.
2012-05-17 22:04:47 +02:00
Aymeric Augustin
20e6973682
Fixed #18323 -- Refactored date arithmetic
...
in date based generic views, in order to deal properly with both
DateFields and DateTimeFields.
2012-05-17 17:41:37 +02:00
Aymeric Augustin
dcd4383107
Fixed #9893 -- Validated the length of file names
...
after the full file name is generated by the storage class.
Thanks Refefer for the report, carsongee for the patch, and
everyone else involved in the discussion.
2012-05-17 16:02:05 +02:00
Aymeric Augustin
c4996df16c
Fixed #17449 -- Added OPTIONS to generic views.
...
Thanks estebistec for the report and patch.
2012-05-17 13:54:51 +02:00
Aymeric Augustin
009e237cf0
Fixed #17535 -- Optimized list generic views.
...
When allow_empty is False, prevented the view from loading
the entire queryset in memory when pagination is enabled.
2012-05-17 13:34:53 +02:00
Claude Paroz
eb0140bddc
Hidden __pycache__ dirs for FilePathField. Refs #17393 .
...
This will be tested as soon as tests will run under Python 3. Patch
taken from Vinay Sajip's Python 3 branch.
2012-05-16 23:15:49 +02:00
Travis Swicegood
f92c7c5df2
Swap out to === for the true comparison to avoid possible coercion issues
2012-05-16 13:40:24 -05:00
Travis Swicegood
6e3b9962cc
Add missing semi-colons
2012-05-16 13:38:23 -05:00
Travis Swicegood
67fd30e9ab
Remove `var` declaration---this variable is already delcared as an argument
2012-05-16 13:38:02 -05:00
Travis Swicegood
c647065b49
Make sure these functions don't bleed into the global scope
...
This makes sure that all of these functions are assigned to variables
assigned to the current scope, rather than the global scope. It also
adds a trailing semi-colon to make sure various linters are happy.
2012-05-16 13:33:48 -05:00
Jannis Leidel
5f75ac91df
Fixed #17896 -- Added file_hash method to CachedStaticFilesStorage to be able to customize the way the hashed name of a file is created. Thanks to mkai for the initial patch.
2012-05-16 13:21:50 +02:00
Claude Paroz
bb4452f212
Fixed #18019 -- Use threaded runserver only when database supports it.
2012-05-15 09:21:10 +02:00
Aymeric Augustin
fcb09b5746
Fixed #10890 : added prev/next_week in the context
...
of per-week date-based generic views. Thanks ee_lars for the report.
2012-05-14 22:40:45 +02:00
Claude Paroz
bbb12581db
Replaced im_func and im_self by __func__ and __self__.
...
The new names are Python 3 compatible.
2012-05-12 22:35:21 +02:00
Claude Paroz
33ffd28d76
Added missing relative imports in test files.
2012-05-12 19:58:32 +02:00
Andrei Antoukh
365853da01
Fixed #4102 -- Allow update of specific fields in model.save()
...
Added the ability to update only part of the model's fields in
model.save() by introducing a new kwarg "update_fields". Thanks
to all the numerous reviewers and commenters in the ticket
2012-05-12 10:29:41 +03:00
Marc Neuwirth
b719cbb901
Removed 'return false' in favor of preventDefault.
...
Moved preventDefault to the top
2012-05-12 00:39:31 -04:00
Adrian Holovaty
25128856f5
Fixed typo in utils/archive.py docstring
2012-05-11 13:51:19 -05:00
Tyler Ball
1c30063faf
Fixed #18298 -- Marked error strings as translatable in CA localflavor.
2012-05-11 08:53:36 +02:00
Aymeric Augustin
3dde02640c
Fixed #17518 -- CSS glitch in StackedInline.
...
Thanks sebastian for the report and patch.
2012-05-10 22:44:40 +02:00
Aymeric Augustin
46648b641d
Fixed #17798 -- Tweaked the CA localflavor.
...
Thanks shelldweller.
2012-05-10 22:19:01 +02:00
Aymeric Augustin
b1155adcde
Fixed #18093 -- Added a pk to AnonymousUser.
2012-05-10 21:42:13 +02:00
Claude Paroz
169b1a404c
Replaced foo.next() by next(foo).
...
This new syntax for next() has been introduced in Python 2.6 and is
compatible with Python 3.
2012-05-10 20:15:49 +02:00
Jannis Leidel
1c1a229632
Set the post process cache when finished instead of one by one.
...
This should prevent a race condition if running collectstatic is
canceled or its cache is accessed from other processes, leaving the
cache in a corrupt state.
2012-05-10 18:31:48 +02:00
Anssi Kääriäinen
c2e1ecb4b1
Fix proxy model Query.remove_inherited_models()
...
Fixed #18248 -- proxy models were added to included_inherited_models
in sql.query.Query. The variable is meant to be used for multitable
inheritance only. This mistake caused problems in situations where
proxy model's query was reused.
2012-05-09 20:33:31 +03:00
maurizio
6524ef501d
Comment._get_userinfo is thread safe now
2012-05-08 17:25:31 +02:00
Anssi Kääriäinen
9877e84caa
Fixed total_ordering for Python < 2.7.2
...
The total_ordering in Python versions prior to 2.7.2 is buggy, and
this caused infinite recursion for Field comparisons on those
versions. Use the borrowed total_ordering for all Python versions
prior to 2.7.2.
The buggy total_ordering was introduced in commit
5cbfb48b92
2012-05-07 21:03:21 +03:00
Simon Charette
5cbfb48b92
Made model fields comparable to other objects
...
Fixed #17851 -- Added __lt__ and @total_ordering to models.Field,
made sure these work correctly on other objects than Field, too.
2012-05-07 20:08:20 +03:00
Claude Paroz
1aae1cba99
Imported zip from future_builtins instead of itertools.izip.
...
In Python 3, itertools.izip is not available any more (behaviour
integrated in standard zip).
2012-05-07 17:25:12 +02:00
Claude Paroz
57102ce781
Used io.BytesIO also for ContentFile.
...
io.StringIO would force the content to be Unicode, which would be
slightly backwards incompatible.
2012-05-05 22:33:08 +02:00
Claude Paroz
d7dfab59ea
Replaced cStringIO.StringIO by io.BytesIO.
...
Also replaced StringIO.StringIO by BytesIO in some other appropriate
places. StringIO is not available in Python 3.
2012-05-05 21:41:44 +02:00